Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

My Manifesto of pointless exceptions checking

Name: Anonymous 2011-05-09 12:59

I'm tired of seeing in Internet this pattern:

try {
        /* sth */
} catch (Exception e) {
    System.out.println("error");
}


That's why I made bellow my manifesto:

Exceptions should be checked only if:
1. You can perform recovery action
2. From context you may print information, that may help to investigate problem

In other cases, they should not be checked, because You may not do anything useful in that situation.

Exception mechanism built in language should:
1. Show useful informations about occurred faults

Name: Anonymous 2011-05-09 13:25

Exceptions are just continuations.

Name: Anonymous 2011-05-09 13:42

>>1
Agreed OP. Unfortunately, Java with it's checked exceptions and exception specifications is largely equivalent to using try-catch blocks all over the play for redundant exception forwarding.

So part of your manifesto should be to not use Java.

Name: Anonymous 2011-05-09 14:22

>>>3
That's true, I will update it.

Name: Anonymous 2011-05-09 15:02

>>3
MY AUTISM IS ANGRY WITH YOUR POST BECAUSE IT IS REDUNDANT. IF NOT USING JAVA IS A LOGICAL CONSEQUENCE FROM A SET OF RULES, THEN THERE IS NO REASON TO ADD IT TO THE SET OF RULES. FUCK YOU.

Name: Anonymous 2011-05-09 15:08

>>5
It is still a valid corollary in and of itself, and it needed to be pointed out as the OP had used a Java code snippet in his example.

Name: Anonymous 2011-05-09 21:30

>>5
lol you know that is the basis of logic and mathematics right?

Name: Anonymous 2011-05-09 22:08

MORE LIKE
WHAT IF YOUR RECOVERY CODE EXPERIENCES AN EXCEPTION OMG
AMIRITE LOLLLLLLLLLLLLLLLLLLLLLLLZzz!!11oNE!!1ONE1!

Name: Waka Flocka 2011-05-10 0:56

I GO HARD IN THE MOTHERFUCKING PAINT NIGGA

Don't change these.
Name: Email:
Entire Thread Thread List