Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Exception handling on server side.

 
Ranch Hand
Posts: 113
  • 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..
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • 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
  • 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
Posts: 17346
11
Mac IntelliJ IDE Spring
  • 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
 
Ranch Hand
Posts: 2937
  • 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:
 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic