java - Writing error messages for unchecked errors? -


when create checked error classes include message display so:

class parseexception extends exception{     public parseexception (string message) {         super (message);     } } 

is programming practice write error message unchecked exception seeing program unable continue anyway? sorry if it's not great question, i'm new java , couldn't find discussion on matter online.

yes, practice. reason developer runs code , encounters error can see reason crash, better explained in exception message stack trace. of course means message has more meaningful "an error occurred". written exception messages can go long way in helping developers debug own code while using else's (or own) code.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -