~
BEGIN
OPEN AlpineEmergency;
stopOnUNWIND: BOOL ← FALSE;
UnwindingMonitor:
PUBLIC
PROC []
RETURNS [] ~ {
IF stopOnUNWIND THEN DebuggerSwap.CallDebugger["UNWINDing monitor: Since monitor data may be inconsistent, proceeding from this is inadvisable"];
emergencies ← CONS[ ["Unwinding Monitor", NIL, unknown], emergencies ];
};
stopOnUncaught : BOOL ← FALSE;
UncaughtThruMonitor:
PUBLIC
PROC []
RETURNS [] ~ {
IF stopOnUncaught THEN DebuggerSwap.CallDebugger["UNCAUGHT passing through monitor -- unwind disaster imminent"];
emergencies ← CONS[ ["UNCAUGHT through monitor", NIL, unknown], emergencies ];
};
stopOnEmergency: BOOL ← FALSE;
emergencies:
LIST
OF
RECORD [
info: Rope.ROPE,
kind: Kind,
source: Source
];
Emergency:
PUBLIC
ENTRY
PROC [info: Rope.
ROPE, kind: Kind, source: Source]
RETURNS [] ~ {
IF stopOnEmergency THEN DebuggerSwap.CallDebugger["AlpineEmergency - info has reason"];
emergencies ← CONS[ [info, kind, source], emergencies ];
};