• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling exceptions

 
Pallav Grigo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • 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.
 
Geir Morten Hagen
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic