Closed Bug 102276 Opened 23 years ago Closed 22 years ago

[ps] Need better error handling when lp not defined

Categories

(Core :: Printing: Output, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: sujay, Assigned: zhayupeng)

References

Details

Attachments

(1 file)

(deleted), patch
roland.mainz
: review+
bzbarsky
: superreview+
Details | Diff | Splinter Review
from bug 92344

In 4.x if lp is not definted, it throws up an error panel with something
like this:  "lpr: lp: unknown printer". 

we need to do something like this for 6.x
mozilla/gfx/public/nsIDeviceContext.h has some error codes for this purpose.
NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND may be the one you're looking for...
taking
Assignee: dcone → rods
Priority: -- → P1
Target Milestone: --- → mozilla0.9.6
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Target Milestone: mozilla0.9.7 → mozilla0.9.9
Is this still a problem?
yes this should still be a problem. see how we handle it 
for 4.x...
Target Milestone: mozilla0.9.9 → mozilla1.2
Priority: P1 → P2
Target Milestone: mozilla1.2 → Future
Blocks: 157675
Who have idea on how to get error when lp/lpr not defined?
I checked these code:
pipe = popen(mPrintSetup->print_cmd, "w");
The popen will always return no-NULL even command not found. And errno is always 0.
Shall I check the file exists for lp/lpr? I don't think it's a good idea since
it make things more complex...
Attached patch patch (deleted) β€” β€” Splinter Review
Based on Roland(Roland.Mainz@informatik.med.uni-giessen.de)'s patch(attachment
83527 [details] [diff] [review]) in bug 143109, but use errno to determine error.
*** Bug 143109 has been marked as a duplicate of this bug. ***
Summary: need better error handling when lp not defined → [ps] Need better error handling when lp not defined
=>
Assignee: rods → pete.zha
Status: ASSIGNED → NEW
Roland, dcone,
Could you give r=? Thanks
Comment on attachment 92355 [details] [diff] [review]
patch

r=Roland.Mainz@informatik.med.uni-giessen.de
Attachment #92355 - Flags: review+
Comment on attachment 92355 [details] [diff] [review]
patch

sr=bzbarsky
Attachment #92355 - Flags: superreview+
checked in trunk
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Requesting a{1.0.2}= ...
Keywords: mozilla1.0.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: