AlpineEmergencyImpl.mesa
Carl Hauser, January 24, 1986 10:12:36 am PST
DIRECTORY
AlpineEmergency,
DebuggerSwap USING [CallDebugger],
Rope USING [ROPE];
AlpineEmergencyImpl: CEDAR MONITOR
IMPORTS DebuggerSwap
EXPORTS AlpineEmergency
~ BEGIN OPEN AlpineEmergency;
stopOnUNWIND: BOOLFALSE;
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 : BOOLFALSE;
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: BOOLFALSE;
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 ];
};
END.