Closed
Bug 234752
Opened 21 years ago
Closed 21 years ago
Print code returns NS_OK in cases where it should return an error
Categories
(Core :: Printing: Output, defect)
Core
Printing: Output
Tracking
()
RESOLVED
FIXED
People
(Reporter: roland.mainz, Assigned: roland.mainz)
Details
Attachments
(1 file)
8.18 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Print code returns NS_OK in cases where it should return an error.
One of the (bad) examples is:
content/base/src/nsDocumentViewer.cpp
-- snip --
// Check to see if this document is still busy
// If it is busy and we aren't already "queued" up to print then
// Indicate there is a print pending and cache the args for later
PRUint32 busyFlags = nsIDocShell::BUSY_FLAGS_NONE;
if ((NS_FAILED(docShell->GetBusyFlags(&busyFlags)) ||
(busyFlags != nsIDocShell::BUSY_FLAGS_NONE && busyFlags &
nsIDocShell::BUSY_FLAGS_PAGE_LOADING)) &&
!mPrintDocIsFullyLoaded) {
if (!mPrintIsPending) {
mCachedPrintSettings = aPrintSettings;
mCachedPrintWebProgressListner = aWebProgressListener;
mPrintIsPending = PR_TRUE;
}
return NS_OK;
}
-- snip --
IMHO this and other error codes should be more verbose (at least it took two
hours for me today to debug a print problem until I realised that the document
was still loading and couldn't be printed... and the print system returned
NS_OK... ;-( ).
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•21 years ago
|
||
Assignee | ||
Comment 3•21 years ago
|
||
Comment on attachment 141676 [details] [diff] [review]
Patch for 2004-02-17-trunk
Requesting r=/sr= ...
Additionally to the original patch I addressed a bunch of other problems, too -
and added some PR_LOG() statements which should help to hunt some FireFox
issues with the print (error) dialog.
Attachment #141676 -
Flags: superreview?(roc)
Attachment #141676 -
Flags: review?(roc)
Comment on attachment 141676 [details] [diff] [review]
Patch for 2004-02-17-trunk
+NS_ERROR_GFX_PRINTER_DOC_IS_BUSY=The browser cannot print the document while
it is being loaded.
Add "Please wait for the document to finish loading and try again"
?
+NS_ERROR_GFX_PRINTING_NOT_IMPLEMENTED=Printing is not implemented.
Add "Please download another Mozilla build"
? Or maybe the xprint extension?
r+sr in any case
Attachment #141676 -
Flags: superreview?(roc)
Attachment #141676 -
Flags: superreview+
Attachment #141676 -
Flags: review?(roc)
Attachment #141676 -
Flags: review+
Assignee | ||
Comment 5•21 years ago
|
||
(In reply to comment #4)
> (From update of attachment 141676 [details] [diff] [review])
> +NS_ERROR_GFX_PRINTER_DOC_IS_BUSY=The browser cannot print the document while
> it is being loaded.
>
> Add "Please wait for the document to finish loading and try again"
> ?
No, the error may happen AFAIK for pages which are loading permanently (like
chat room pages) ... loading will never end for such pages... :)
> +NS_ERROR_GFX_PRINTING_NOT_IMPLEMENTED=Printing is not implemented.
>
> Add "Please download another Mozilla build"
> ? Or maybe the xprint extension?
No, this has nothing todo with Xprint. Mozilla has a secret build flag to turn
all print support off - and in that case nothing can't be done (except loading
another build :) ... and normal printing has extra error codes (no printer
found, print module cannot be loaded, Xprint server not found) for all the cases
I am aware of (even "access to printer denied" to make Netware freaks happy :)).
> r+sr in any case
Thanks!
Checked in for gisburn.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•