[comp.windows.x] Extension errors

jbrac@AMD-16.HAC.COM (Jim Brackett) (09/12/89)

In adding extensions, I wanted to make use of the standard X error
handling (and reporting) and only provide extension error text by
providing a routine which is defined by XESetErrorString. However,
to do this I had to change _XPrintDefaultError (in XlibInt.c) to 
print the minor opcode and to return 0 (since the extension errors
are non-terminal). Is there an alternative which doesn't require
changing core routines (or doing all error handling/reporting in the
extension).

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (09/12/89)

    In adding extensions, I wanted to make use of the standard X error
    handling (and reporting) and only provide extension error text by
    providing a routine which is defined by XESetErrorString.

The following change to XGetErrorDatabaseText (on page 273 in the DP book)
will happen in R4:

XRequest  /+ For a core protocol request, +/ the major request protocol
	  number is used for the message argument.  /+ For an extension
	  request, the extension name (as given to XInitExtension) appended
	  with a period and the minor request protocol number is used for
	  the message argument. +/  If no string is found in the error
	  database, the default_string is returned to the buffer argument.