• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

User message when server is out

 
Fernando Franzini
Ranch Hand
Posts: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks
I've thought how to show a friendly message error to user when application server is out for some reason.
What I've done is:

that way, the message is not friendly...look here:
Connection refused to host: 10.1.15.53; nested exception is:
java.net.ConnectException: Connection refused: connect


What do you think guys ? Any sugestion ?
Regards.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
E ai Fernando!

Champion... how about this:



You may also want to add to the message e.getMessage() or e.getLocalizedMessage().
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fernando,

I caught the RemoteException and showed a user-friendly message like Roberto is showing in his post. The detailed exception message could be shown too, or you can decide to write that one to log file.

I just showed my user-friendly message and that's it (because there is no logging requirement I turned logging completely off, so no sense to log the exception).

Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic