UncaughtSignalPopUp: RuntimeError.UCSProc =
[msg: WORD, signal: SIGNAL ANY RETURNS ANY, frame: POINTER]
(except that at January 9, 1990 11:19:53 am PST the implementation calls with frame = NIL)
BEGIN
errorMessage: Rope.ROPE ¬ NIL;
self: CARD32 ~ 0;
printProc: StackSummary.PrintSummary ~ {
rope: Rope.ROPE ¬ StackSummary.GetRopeForBasicPCInfo[basicPCInfo, frame.absPC];
PutMsg[IO.PutFR["%g: %g\N", IO.card[frame.frameIndex], IO.rope[rope]]];
};
I belive the following test will eventually go away, when Carl arranges to turn ABORTED into a proper UNWIND. But for the moment, we have to blow the thread away when we are called for ABORTED. This logic is adapted from /pcedar2.0/Debugger/Debugger.mesa.
{
-- extra scope for EXITS
IF signal =
LOOPHOLE[RuntimeError.Aborted]
THEN BlowAwayThread[]
ELSE
BEGIN
open a block to so that unwind catches can close the connection
BEGIN
ENABLE {
StackSummary.NoStack => {
errorMessage ¬ message;
GOTO fatal};
UNWIND => {NULL}};
StackSummary.Summary[self, printProc];
END;
PutMsg[IO.PutFR["This is the end of the stack\N"]];
ERROR ABORTED;
END;
EXITS
fatal => {
IF Rope.Length[errorMessage] # 0 THEN originalUCS[0, NIL, NIL];
};
};
END;