DIRECTORY Interpress, IPInterpreter, List USING [AList, Assoc, PutAssoc], ProcessProps USING [AddPropList, GetPropList], Rope USING [ROPE]; IPErrorImpl: CEDAR PROGRAM IMPORTS IPInterpreter, List, ProcessProps EXPORTS Interpress, IPInterpreter ~ BEGIN OPEN IPInterpreter; ROPE: TYPE ~ Rope.ROPE; stateKey: ATOM ~ $InterpressMaster; OpenMaster: TYPE ~ Interpress.OpenMaster; AddMaster: PUBLIC PROC [master: OpenMaster, inner: PROC] ~ { aList: List.AList _ NIL; aList _ List.PutAssoc[key: stateKey, val: master, aList: aList]; ProcessProps.AddPropList[aList, inner]; }; GetMaster: PUBLIC PROC RETURNS [OpenMaster] ~ { aList: List.AList ~ ProcessProps.GetPropList[]; val: REF ~ List.Assoc[key: stateKey, aList: aList]; WITH val SELECT FROM val: OpenMaster => RETURN[val] ENDCASE; RETURN[NIL]; }; ReportError: PUBLIC PROC [code: Cardinal, atom: ATOM, message: ROPE] ~ { master: OpenMaster ~ GetMaster[]; IF master#NIL AND master.logProc#NIL THEN master.logProc[master, code, atom, message]; IF code=masterErrorCode THEN ERROR MarkRecovery; }; MasterError: PUBLIC PROC [atom: ATOM, message: ROPE] ~ { ReportError[masterErrorCode, atom, message]; }; MasterWarning: PUBLIC PROC [atom: ATOM, message: ROPE] ~ { ReportError[masterWarningCode, atom, message]; }; END. hIPErrorImpl.mesa Copyright c 1984, 1985 Xerox Corporation. All rights reserved. Doug Wyatt, November 21, 1985 3:15:42 pm PST Errors and Signals known throughout the Interpress interpreter NonDefaultingATOM: TYPE ~ ATOM _; MasterErrorCodeTable: TYPE ~ ARRAY MasterErrorType OF NonDefaultingATOM; MasterWarningCodeTable: TYPE ~ ARRAY MasterWarningType OF NonDefaultingATOM; masterErrorCode: REF MasterErrorCodeTable ~ NEW[MasterErrorCodeTable _ [bug: $bug, unimplemented: $unimplemented, boundsFault: $boundsFault, nilFault: $nilFault, invalidArgs: $invalidArgs, limitExceeded: $limitExceeded, markMismatch: $markMismatch, missingBody: $missingBody, notCardinal: $notCardinal, stackOverflow: $stackOverflow, stackUnderflow: $stackUnderflow, undefinedOperation: $undefinedOperation, undefinedProperty: $undefinedProperty, unmarkFailed: $unmarkFailed, wrongType: $wrongType]]; masterWarningCode: REF MasterWarningCodeTable ~ NEW[MasterWarningCodeTable _ [bug: $bug, unimplemented: $unimplemented, nullValue: $nullValue, illegalIdentifier: $illegalIdentifier, illegalString: $illegalString, unknownToken: $unknownToken]]; Κ‡˜codešœ™Kšœ Οmœ4™?Kšœ,™,—K™Kšœ>™>K™šΟk ˜ Kšœ ˜ Kšœ˜Kšœžœ˜$Kšœ žœ˜.Kšœžœžœ˜—K˜KšΠbl œžœž˜Kšžœ"˜)Kšžœ˜!Kšœžœžœ˜K˜Kšžœžœžœ˜K˜Kšœ žœ˜#K˜Kšœ žœ˜)K˜šΟn œžœžœžœ˜