I'm currently working on a new update for the API. I'm looking to add
exceptions back in and wanted to get some feedback on how this should
work. My preference is for a hierarchy of detailed exceptions however
IDL does not allow Exception inheritence which makes that difficult. So
this is what I'm currently looking at.

   enum ErrorCodes {
      VendorError,
      WrongContentType,
      NoSuchService,
      InvalidService,
      NoSuchCollection,
      PermissionDenied,
      InvalidResource,
      NoSuchResource,
      InvalidCollection,
      InvalidDatabase,
      NoSuchDatabase
   };
   
   exception XMLDBException {
      string message;
      ErrorCodes errorCode;
      long vendorErrorCode;
   };

There is just one exception that is declared to be thrown by all methods
but contains a detailed ErrorCode. If the errorCode field is set to
ErrorCodes.VendorError then the exception is vendor specific and the
vendorErrorCode should be consulted.

Comments?

-- 
Kimbro Staken
Chief Technology Officer
dbXML Group L.L.C
http://www.dbxmlgroup.com

----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact adminstrator:   mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------

Reply via email to