Article:
 |
|
What I Hate About Your Programming Language
|
| Subject: |
|
Java: Catch all exceptions? |
| Date: |
|
2003-05-13 15:27:43 |
| From: |
|
anonymous2
|
Response to: Java: Catch all exceptions?
|
|
I believe if you change "catch" to "care about" you're closer to what the author intends, but you still have to add "non-runtime" in front of exceptions (The compiler doesn't force every method to throw or catch runtime exceptions thrown in child methods).
I circumvent that behavior by declaring (almost) all of my exceptions as runtime.
I don't think Java should require the addition of "throws" to the method declaration for non-runtime exceptions. It should just be implied.
Does anyone have an advantage that forcing the "throws" provides?
|
Showing messages 1 through 5 of 5.
-
Java: Catch all exceptions?
2003-05-13 19:30:50
anonymous2
[View]
-
Java: Catch all exceptions?
2003-05-13 17:50:15
anonymous2
[View]
-
Java: Catch all exceptions?
2003-05-13 17:19:41
anonymous2
[View]
-
Java: Catch all exceptions?
2003-05-13 15:44:26
anonymous2
[View]
-
Java: Catch all exceptions?
2003-05-13 16:03:56
zipwow
[View]