DIRECTORY Xl USING [Connection, ErrorNotifyEvent, EventRep, EventProcType, Match, SequenceNo]; XlPrivateErrorHandling: CEDAR DEFINITIONS = BEGIN RegisterErrorReportProc: PROC [proc: Xl.EventProcType]; ErrorReportProc: PROC [] RETURNS [Xl.EventProcType]; RegisterErrorMatch: PROC [c: Xl.Connection, errorMatch: Xl.Match]; ExplainerProc: TYPE = PROC [errorEvent: Xl.ErrorNotifyEvent]; RegisterExplainer: PROC [proc: ExplainerProc]; Explain: PROC [errorEvent: Xl.ErrorNotifyEvent]; NewErrorEvent: PROC [reply: REF ANY, connection: Xl.Connection ¬ NIL, sequenceNumber: Xl.SequenceNo ¬ 0] RETURNS [REF Xl.EventRep.errorNotify]; RaiseErrorEvent: PROC [errorEvent: Xl.ErrorNotifyEvent]; RaiseClientError: PROC [c: Xl.Connection, what: REF ¬ NIL]; RaiseServerError: PROC [c: Xl.Connection, what: REF ¬ NIL, reply: REF ANY ¬ NIL]; RegisterRaiseErrorEvent: PROC [PROC [errorEvent: Xl.ErrorNotifyEvent]]; END. ϊXlPrivateErrorHandling.mesa Copyright Σ 1991, 1992, 1993 by Xerox Corporation. All rights reserved. Christian Jacobi, November 6, 1991 9:57:47 am PST Christian Jacobi, May 3, 1993 10:17 am PDT Private interface which allows to customize handling of errors reported by an X server. In general Xl allows to specify error handling on a per request basis. This module allows to specify what the default handling of error events should be if a request did NOT explicitely define error handling. This module is private and at the level of XlImpl; no application specific clients please. Asynchronous errors handling errors reported by the X server Registers global error report procedure to report X errors back to the user or client. This procedure is called when no connection specific error match has been set up. Returns global procedure used to report X errors. Never returns NIL Registers match for asynchrounous X errors not otherwise caught for this connection. This is for connection setup. It should NOT dynamically be changed like in Xlib, because this would interfere with asynchronous requestors. Making errors human readable Registers procedure used to initialize explanation field Fills in explanation field by analyzing replyText, (if non NIL). Clients might have to call Explain explicitely: it is sometimes not called internally because it is better called outside critical regions of XlImpl. Once the explanation field is set, further calls to Explain are noops. Generating errors Builds an error event from given reply structure. Fills in connection and sequenceNumber. reply: NIL, or, correct type only. Ref any to prevent exposure of the definitions Sets the server generated field to TRUE if reply#NIL This is safe for use inside monitors, and, Explain is not yet called. Raises an Xl.XError inline. Useful for implementing requests with replies. Builds an error event for clientError, and, raises it inline. Client errors are raised to denote erronous call of an Xl funcion; raised without querrying the X server. what: human readable in debugger Builds an error event for for blaming the X server, and, raises it inline. Server errors are raised when Xl believes the X server is sending bogus data. reply: NIL, or, correct type only. Ref any to prevent exposure of the definitions what: human readable in debugger Registers a procedure to implement RaiseErrorEvent. This is not a client feature but a means enable debugging ugly recurring errors. Use NIL to reregister the default procedure. Κ•NewlineDelimiter –(cedarcode) style˜codešœ™Kšœ Οeœ>™IK™1K™*K™™YK™Ρ—K™K™ZK™—KšΟk œžœL˜^K˜KšΟnœžœž œ˜+Kšž˜headšŸ™J™(K˜šŸœžœ˜7K™WK™SK˜—šŸœžœžœ˜4K™3K™K™—šŸœžœ*˜BK™TK™K™——šŸ™Kšœžœžœ#˜=K™šŸœžœ˜.Kšœ8™8K˜—šŸœžœ#˜0K™@K™—K™H——šŸ™šŸ œžœ žœžœžœ%žœžœ˜KšœZ™ZK™RK™4K™EK˜—šŸœžœ#˜8KšœK™KK˜—šŸœžœžœžœ˜;K™>K™jK™ K™—šŸœžœžœžœ žœžœžœ˜QK™KK™NK™RK™ K™—šŸœžœžœ$˜GK™΅——K˜Kšžœ˜K˜—…—Œ™