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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -