mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
* InvalidPDFException added
* Act on throwing an Exception and InvalidPDFException by rejecting the worker instead of throwing * changed message for all builds * alerting and closing window only for B2G builds * invalid_file_error added to l10n (en and pl) * UnknownErrorException added and used for every error()
This commit is contained in:
parent
336d5041dd
commit
812bc6795d
7 changed files with 62 additions and 5 deletions
|
@ -124,9 +124,19 @@ var WorkerMessageHandler = {
|
|||
});
|
||||
}
|
||||
|
||||
return;
|
||||
} else if (e instanceof InvalidPDFException) {
|
||||
handler.send('InvalidPDF', {
|
||||
exception: e
|
||||
});
|
||||
|
||||
return;
|
||||
} else {
|
||||
throw e;
|
||||
handler.send('UnknownError', {
|
||||
exception: new UnknownErrorException(e.message, e.toString())
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
var doc = {
|
||||
|
@ -331,4 +341,3 @@ if (typeof window === 'undefined') {
|
|||
var handler = new MessageHandler('worker_processor', this);
|
||||
WorkerMessageHandler.setup(handler);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue