Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the principle to handle the exception

 
Zee Ho
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi rancchers, My thought of handling the exception is

in the front-end, for any exception occurs, using JDialog to prompt that what has happed, for the back-end, using the java logging to log all the exception to a file rather than throw them out.

is it a proper way, or just use System.out.println to simply show them in the console?
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the front-end, for any exception occurs, using JDialog to prompt that what has happed, for the back-end, using the java logging to log all the exception to a file rather than throw them out.
That is how I handled it, logging it at the appropriate level and then using a static method in one of my GUI classes to display a meaningful error message to the user.
 
Zee Ho
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thx, so no one use the System.out.println to handle exception, right?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic