It gives you control over the output of your program (and as you mention, the exact error code - which probably should be 1 in this instance).
It's often more user friendly to print a short human-readable message (or nothing) than to dump a huge stack trace. YMMV, if this is an internal dev tool then the opposite might be true!
Comments
It gives you control over the output of your program (and as you mention, the exact error code - which probably should be 1 in this instance).
It's often more user friendly to print a short human-readable message (or nothing) than to dump a huge stack trace. YMMV, if this is an internal dev tool then the opposite might be true!