When cancel is pressed in the print dialog, this, by its current nature, causes an exception to be thrown, resulting in a really scary message on the console (for those blessed with one). This here patch quietens it. bug=64594, r=timeless, a=ben

This commit is contained in:
disttsc%bart.nl 2001-03-01 10:49:15 +00:00
parent c062803646
commit 83c3e701ec

View File

@ -859,7 +859,14 @@ function BrowserPrintPreview()
function BrowserPrint()
{
// using _content.print() until printing becomes scriptable on docShell
_content.print();
try {
_content.print();
} catch (e) {
// Pressing cancel is expressed as an NS_ERROR_FAILURE return value,
// causing an exception to be thrown which we catch here.
// Unfortunately this will also consume helpful failures, so add a
// dump(e); // if you need to debug
}
}
function BrowserSetDefaultCharacterSet(aCharset)