• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX:Exception handling design

 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the advantages of passing a database file exception or a server
connection exception back to the client to handle; as oppossed to handling
the exception were it occurs? I notice in Max's book and elsewhere that
he passes all exceptions back to the client. But it seems to me cleaner
to handle the exception upfront. I wonder what sun would say.
 
Tony Collins
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bill Robertson:
What are the advantages of passing a database file exception or a server
connection exception back to the client to handle;

Well say the DB File was not found or corrupt, the Server would have to handle this( though it may just shut down) but assuming it doesn't the client still needs to know that their request was not serviced. The key is the client isn't there to handle the exception, just report to it's user that their was a problem with their request.
But in local mode maybe the user can do something about it, say re-configure the path for the db file, in Network mode nothing can be done by the user, so the exception handling could be differnt for local and networked clients.
Tony
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic