home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 5.ddi / MWHC.005 / 23 < prev    next >
Encoding:
Text File  |  1992-12-09  |  1.2 KB  |  28 lines

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