DIRECTORY IO USING [STREAM], Rope USING [ROPE]; SaffronErrorHandling: CEDAR DEFINITIONS ~ BEGIN Message: SIGNAL[message: Rope.ROPE]; Warning: SIGNAL[position: INT, reason: Rope.ROPE]; Error: SIGNAL[position: INT, reason: Rope.ROPE]; FatalError: ERROR[position: INT, reason: Rope.ROPE]; InternalError: ERROR[reason: Rope.ROPE]; SignalMessage: PROC[message: Rope.ROPE] ~ INLINE { SIGNAL Message[message]; }; SignalWarning: PROC[position: INT, reason: Rope.ROPE] ~ INLINE { SIGNAL Warning[position, reason]; }; SignalError: PROC[position: INT, reason: Rope.ROPE] ~ INLINE { SIGNAL Error[position, reason]; }; ErrorFatalError: PROC[position: INT, reason: Rope.ROPE] ~ INLINE { ERROR FatalError[position, reason]; }; ErrorInternalError: PROC[reason: Rope.ROPE] ~ INLINE { ERROR InternalError[reason]; }; ReportMessage: PROC[stream: IO.STREAM, count: INT, message: Rope.ROPE]; ReportWarning: PROC[stream: IO.STREAM, count: INT, position: INT, reason: Rope.ROPE]; ReportError: PROC[stream: IO.STREAM, count: INT, position: INT, reason: Rope.ROPE]; ReportFatalError: PROC[stream: IO.STREAM, count: INT, position: INT, reason: Rope.ROPE]; ReportInternalError: PROC[stream: IO.STREAM, reason: Rope.ROPE]; END. τSaffronErrorHandling.mesa Copyright Σ 1988 by Xerox Corporation. All rights reserved. James Rauen, June 18, 1988 1:40:38 pm PDT Last edited by: James Rauen June 20, 1988 8:57:52 am PDT The Message signal (for debugging only) prints a message on the output stream. Warning and Error signals print a message; Error also terminates the compilation after the current phase completes. FatalError is like Error, except that it immediately terminates the compilation. InternalError is used to report internal Saffron errors. It immediately terminates the compilation. All of these signals are handled by the driver (SaffronDriver.mesa). An alternative which avoids explicitly signalling. These procedures are called by the driver to report errors. Κf˜™Icode™Kšœ˜"—š žœœ œœœ˜BKšœ!˜&—šžœœœœ˜6Kšœ˜—K˜K™;Kš ž œœ œœ œœ˜GKšž œœ œœ œ œœ˜UKšž œœ œœ œ œœ˜SKšžœœ œœ œ œœ˜XKš žœœ œœœ˜@K˜Kšœ˜K˜—J™—…—Έ