Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CUPS and error dialogs



First, to put everyone's mind at ease, there is no special error path
for Tioga based drivers. The printer modules are run by
/System/Library/Printers/Libraries/PrintJobMgr. PrintJobMgr is a CUPS
filter. PrintJobMgr takes the error conditions reported by printer
modules and writes that data to stderr just like any other filter
would. If you print from a Tioga driver and look in the error_log you
will see the messages generated by PrintJobMgr. These messages driver
the error reporting UI.

In 10.2, when we switched to CUPS, we needed to emulate some of the
semantics of the Tioga error message handling in the cups error
messages. For that reason you will see the CUPS message prefix (ERROR,
INFO, DEBUG) followed by a second prefix.

/* If a log message is copied into the printer-state-message attribute,
the
* log level prefix is first stripped. We need to give Print Center
information
* about recoverable versus fatal errors. We do that by following the
cups
* prefix with our own.
*/
#define kAppleFatalErrorPrefix "fatal:"
#define kAppleRecoverableErrorPrefix "recoverable:"
#define kAppleClearRecoverableErrorPrefix "recovered:"

All of that said, an error condition logged with simply the cups error
prefix should cause an error dialog to be presented to the user. If you
can confirm that you are seeing this displayed in the UI, I'll
investigate.

CUPS has since added the '+' and '-' prefixes to message to allow
strings to be added and removed from IPP's printer-state-reasons.
[cups/scheduler/printers.c:SetPrinterReasons()] We'll be supporting
that in the UI in the next major OS release.

I hope this helps,

Rich

> Message: 3
> To: Printing <email@hidden>
> From: Dave Camp <email@hidden>
> Subject: CUPS and error dialogs
> Date: Mon, 1 Mar 2004 16:50:44 -0800
>
> I can't seem to get CUPS print jobs to display any kind of error dialog
> like Tioga drivers are able to do.
>
> For example, the following lines of code in my main() don't seem to do
> anything:
>
> fprintf(stderr, "ERROR: This is a bad error\n");
> return 1;
>
> I was expecting to see the OS display some sort of alert indicating the
> print job failed, but that does not happen.
>
> Am I missing something?
>
> Thanks,
> Dave
> ---
> Among the chief weapons of UNIX: Fear, surprise and ruthless
> efficiency.

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.