This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Does anyone see a problem with this code. It seems to occasionally cause my program to just quit. I only use it for testing but I can't find anything wrong.
If it just quits, then it isn't an exception causing the problem. Try catching Error and printing the trace. Yeah, I know this isn't normally done because there is normally nothing the program can do to recover from the problem, however just to figure out what is causing the problem might be worthwhile.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
posted
0
Or catch Throwable, which includes both Error and Exception. When you say it "just quits", do you get any error message? If not, you may find it useful to add a bunch of print statements which tell you what part of the program is executing, so the printout actual as a log of the program's activities. This often offers invaluable clues.