NAME
PRD_SETERRHOOK -- set a hook for error messages (V44)
FUNCTION
This command sets a hook that will be called if the printer.device
returns with an error from any other I/O command. This allows
printer drivers to use private error messages.
IO REQUEST
io_Message mn_ReplyPort set if quick I/O is not possible
io_Device preset by the call to opendevice
io_Command PRD_SETERRORHOOK
io_Hook a pointer to a hook that will be called
Two standard hook values a defined:
PDHOOK_NONE no error hook is to be used
PDHOOK_STD EasyRequest() is used to display the error message
The hook gets a pointer to the iorequest that caused the error as
the object and a pointer to the following structure as message:
struct prterrmsg {
ULONG pe_Version;
ULONG pe_ErrorLevel;
struct window *pe_window; /* window for easyrequest() */
struct easystruct *pe_es;
ULONG *pe_IDCMP;
aptr pe_arglist;
};
pe_Version the message version number PDHOOK_VERSION
pe_ErrorLevel one of RETURN_WARN, RETURN_ERROR, RETURN_FAIL
pe_Window a window pointer (for EasyRequest()) or NULL
pe_ES a pointer to the error message structure
pe_IDCMP a pointer to IDCMP Flags for EasyRequest()
pe_ArgList a pointer to an array of arguments
The simplest case is to use that structure to call EasyRequest()
or to printf() a message to a console (use the error message from
pe_ES and the pe_ArgList).