home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xco212p.zip / ISODEF / generalu.def < prev    next >
Text File  |  1994-12-22  |  857b  |  24 lines

  1. DEFINITION MODULE GeneralUserExceptions;
  2.  
  3. (* Provides facilities for general user-defined exceptions *)
  4.  
  5. TYPE
  6.   GeneralExceptions = (problem, disaster);
  7.  
  8. PROCEDURE RaiseGeneralException (exception: GeneralExceptions; text: ARRAY OF CHAR);
  9.   (* Raises exception using text as the associated message *)
  10.   
  11. PROCEDURE IsGeneralException (): BOOLEAN;
  12.   (* Returns TRUE if the current coroutine is in the exceptional execution state
  13.      because of the raising of an exception from GeneralExceptions;
  14.      otherwise returns FALSE.
  15.   *)
  16.  
  17. PROCEDURE GeneralException(): GeneralExceptions;
  18.   (* If the current coroutine is in the exceptional execution state because of the
  19.      raising of an exception from GeneralExceptions, returns the corresponding
  20.      enumeration value, and otherwise raises an exception.
  21.   *)
  22.  
  23. END GeneralUserExceptions.
  24.