rterror.def 1.4 KB

1234567891011121314151617181920212223242526272829
  1. DEFINITION MODULE RTerror;
  2. TYPE
  3. (* Note - can't provide handling for stack overflow or failure of a
  4. procedure to RETURN. *)
  5. RTtype = (IndexOutOfRange, (* past end of an array *)
  6. ArithmeticOverflow, (* overflow on arithmetic operation *)
  7. SubOutOfRange, (* past end of subrange *)
  8. EnumValue, (* illegal value for enumerated type *)
  9. NILusage); (* dereference of NIL pointer *)
  10. RTproc = PROCEDURE(CARDINAL,CARDINAL,CARDINAL,RTtype) : BOOLEAN;
  11. (* First parameter is absolute segment, second parameter is relative
  12. segment (0FFFFH if outside of main program), third parameter is
  13. offset, fourth parameter is error which occurred. Should return
  14. TRUE if program should continue, or FALSE if program should
  15. terminate via normal run-time error handler. (This procedure may,
  16. instead of returning, call HALT or LONGJMP/TRANSFER control
  17. elsewhere.) If the procedure returns FALSE (signaling that the
  18. run-time system should handle the error), then all of the
  19. user-installed handlers are uninstalled. *)
  20. PROCEDURE InstallRT(handler : RTproc);
  21. (* Start trapping run-time errors... *)
  22. PROCEDURE UnInstallRT;
  23. (* Stop trapping run-time errors... [default] *)
  24. END RTerror.
  25.