mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Change throws to errors.
This commit is contained in:
parent
67769f3741
commit
66e3441e0e
7 changed files with 42 additions and 38 deletions
|
@ -574,7 +574,7 @@ var XRef = (function XRefClosure() {
|
|||
var stream, parser;
|
||||
if (e.uncompressed) {
|
||||
if (e.gen != gen)
|
||||
throw ('inconsistent generation in XRef');
|
||||
error('inconsistent generation in XRef');
|
||||
stream = this.stream.makeSubStream(e.offset);
|
||||
parser = new Parser(new Lexer(stream), true, this);
|
||||
var obj1 = parser.getObj();
|
||||
|
@ -703,7 +703,7 @@ var PDFObjects = (function PDFObjectsClosure() {
|
|||
// If there isn't an object yet or the object isn't resolved, then the
|
||||
// data isn't ready yet!
|
||||
if (!obj || !obj.isResolved) {
|
||||
throw 'Requesting object that isn\'t resolved yet ' + objId;
|
||||
error('Requesting object that isn\'t resolved yet ' + objId);
|
||||
return null;
|
||||
} else {
|
||||
return obj.data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue