• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NX:Exception handling design

 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic