This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception handling on server side.

 
Abhinav Anand
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
Exception handling has 8 points under server design marking scheme.
In my views the exceptions thrown by the server should get categorised under
on super exception so that the client does not has to catch 10 different types
of exception while passing a single remote call.
Any suggetions..
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes but what happens when there is an Exception thrown by the server when you are starting up the server, like it can't finds the db.db file. At this point there is no such thing as a client. No one is connected to the server. So in this case the server has to handle the Exception. hence the 8 points.
Mark
 
Abhinav Anand
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Actually I am not doing anything specific about the server excetion handling. So, i felt like asking if anybody had done anything special about it.
Thanks,
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On mine I had a GUI for my server, and then I displayed Exceptions like I did in the client, displayed a JDialog with a nice message.
The server GUI is not necessary, but I liked that I could start and end the registry without the user having to type anything in a command line.
Mark
 
John Smith
Ranch Hand
Posts: 2937
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Actually I am not doing anything specific about the server excetion handling. So, i felt like asking if anybody had done anything special about it.

I created a ServerException class and mapped the server exceptions on server start up to that class. If an exception occurs, a meaningful message is displayed to the client:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic