mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 14:46:02 +00:00
use try and catch
This commit is contained in:
parent
20e4a07aa6
commit
670a83eed2
@ -76,9 +76,19 @@ function MessengerSetDefaultCharacterSet(aCharset)
|
||||
|
||||
function Print() {
|
||||
dump("Print()\n");
|
||||
messenger.DoPrint();
|
||||
try {
|
||||
messenger.DoPrint();
|
||||
}
|
||||
catch (ex) {
|
||||
dump("failed to print\n");
|
||||
}
|
||||
}
|
||||
function PrintPreview() {
|
||||
dump("PrintPreview()\n");
|
||||
messenger.DoPrintPreview();
|
||||
try {
|
||||
messenger.DoPrintPreview();
|
||||
}
|
||||
catch (ex) {
|
||||
dump("failed to print preview\n");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user