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

Exceptions are shit

Name: Anonymous 2015-02-21 10:49

Name: Anonymous 2015-03-05 20:23

>>53

People would much rather write:

try {
fun1();
fun2();
fun3();
}
catch(Fun1Exception e) {
eek1();
}
catch(Fun2Exception e) {
eek2();
}
catch(Fun3Exception e) {
eek3();
}


Which works as long as each function in each line of the try block returns a unique exception. The problem is they don't in general. If you write all your code like >>52, then the arguments don't apply, but >>52 is objectively unreadable. Note this code will still compile. Even so, the information you have in each catch block is imprecise.

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