home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c220 / 4.ddi / LIB / SRC / EXCEPT.PF < prev    next >
Encoding:
Text File  |  1990-12-16  |  1.1 KB  |  26 lines

  1. pragma C_include('Implement.pf');
  2.  
  3. package Exceptions;
  4.    pragma Routine_aliasing_convention(Implement.RTE_ALIASING);
  5.    { Exception handling package.    }
  6.    var Current_exception: Cardinal;
  7.    type E_arg = procedure;
  8. #if 0
  9.     A call to Exception sets up Handler as the exception handler for
  10.     block Block.  If an exception occurs during the processing of
  11.     Block or any routine it calls, and no handler handles it, then
  12.     Exception terminates the processing of Block and calls Handler.
  13.     Exceptions are raised by calling procedure Raise with the number
  14.     of the exception.  The current exception is in Current_exception.
  15.     Handler may choose to not handle the exception by calling Reraise,
  16.     which is identical to Raise(Current_exception).
  17. #endif
  18.    procedure Exception(Block, Handler: E_arg);    External;
  19.    --    Raise exception E.  If there is no handler available, then
  20.    --    raise produces a call-chain dump and terminates processing.
  21.    --    Otherwise, the handler is called.
  22.    procedure Raise(E:Cardinal);            External;
  23.    --    Equivalent to Raise(Current_exception).
  24.    procedure Reraise;                External;
  25.    end;
  26.