> Thanks Monique. I surrounded all of the relevent code with the try block
> which then resulted in another error, which was an IOException. Rinse and
[quoted text clipped - 22 lines]
> Of course with the apropriately nested catch statements. Is there a
> cleaner way to do this?

Signature
monique
Help us help you:
http://www.catb.org/~esr/faqs/smart-questions.html
>> Thanks Monique. I surrounded all of the relevent code with the try block
>> which then resulted in another error, which was an IOException. Rinse and
[quoted text clipped - 29 lines]
> catch (BException b){}
> etc.
Ok, I will implement this. I thought the nested try's were odd.
> By the way, I don't know what particularly you're trying to achieve,
> but you almost certainly want to put something more substantive in
> those catches. If there's absolutely nothing your program can do when
> it tries to open a nonexistant file, you might abort the whole app. If
> it's a program that interacts with a user, you might give them an
> opportunity to select a different file. Etc.
What? My messages are perfect! How dare you critisize my coding sytle!
:-P
I just put those messages in for the sake of brevity. I will put more
meaningful messages and some error handling as well. This particular app
does not have any interaction so I think I will quit with a message to a
log file in most cases.
Thanks again,
fybar
Oliver Wong - 25 Apr 2006 22:04 GMT
> This particular app
> does not have any interaction so I think I will quit with a message to a
> log file in most cases.
Just as a heads up in case you don't know about it (since you seem a bit
new to Java), there's a built in logging mechanism, so you don't have to
design your own. See:
http://java.sun.com/j2se/1.5.0/docs/guide/logging/overview.html
http://java.sun.com/j2se/1.5.0/docs/api/java/util/logging/package-summary.html
- Oliver