Chapter 15 Working with IDL


How to raise an exception

You define an exception using a class with the <<CORBAException>> stereotype, and declaring this class as inner to the interface likely to raise the exception.

The list of exceptions is defined in the Exceptions tabbed page in the Implementation page of an operation, with no enclosing parentheses.


interface TEX {
   exception Badness2000 {
      string err_msg;
   };

   void process_token(in string tok) raises (Badness2000);
   
};


struct AdminLimit {
   PropertyName name;
   PropertyValue value;
};

exception AdminLimitExceeded {
   AdminLimit admin_property_error;
};

 


Copyright (C) 2005. Sybase Inc. All rights reserved.