• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Handling exceptions

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone..a question about handling exceptions...should i call error.printStackTrace()() on the server and/or client side?? Or is it just better to display them a user-friendly message??
Regards,
Pallav.
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just finished my assignment, and I have handled exceptions in the layer where they logically occur. If an exception is thrown at the server side I just use Exception.getMessage() and print it to the console. When exceptions is thrown on the server, the exception should also be thrown in the remote object, and consequently they will be thrown on the client side. On the client side I've used JOptionPane.showMessageDialog() to present the user with "friendly" error messages.
 
reply
    Bookmark Topic Watch Topic
  • New Topic