Article:
 |
|
What I Hate About Your Programming Language
|
| Subject: |
|
Java + Exceptions |
| Date: |
|
2003-05-15 10:11:33 |
| From: |
|
chromatic
|
Response to: Java + Exceptions
|
|
Yes, that's exactly my gripe.
If I don't think a missing file is an exceptional condition within the current program, I don't really have the option to ignore FileNotFoundException. I either catch it explicitly or let it propogate upwards and crash with a stack trace.
I'd like to be able to ignore (as in, "not have to write any code to tell the language not to do something") certain exceptions sometimes. I don't have that option in Java, unless I do a bit of metaprogramming or rethrow exceptions as run-time exceptions, or some other technique.
The problem with a mandatory, checked exception system is that what Sun thinks are exceptional conditions are not always what I think are exceptional conditions in certain situations.
|
Showing messages 1 through 1 of 1.
-
Java + Exceptions
2003-05-15 15:22:48
anonymous2
[View]
If you are selectivly able to ignore exceptions you wind up either missing important cases or writing catchal (like ... or Exception) and handling exceptions it a totaly wrong manener.
You should not be using exceptions to automagically end the program - that is the height of lazyness.