• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is the principle to handle the exception

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thx, so no one use the System.out.println to handle exception, right?
reply
    Bookmark Topic Watch Topic
  • New Topic