mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Change throws to errors.
This commit is contained in:
parent
67769f3741
commit
66e3441e0e
7 changed files with 42 additions and 38 deletions
|
@ -548,7 +548,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
var fontObj = this.objs.get(fontRefName).fontObj;
|
||||
|
||||
if (!fontObj) {
|
||||
throw 'Can\'t find font for ' + fontRefName;
|
||||
error('Can\'t find font for ' + fontRefName);
|
||||
}
|
||||
|
||||
var name = fontObj.loadedName || 'sans-serif';
|
||||
|
@ -866,7 +866,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
} else if (IR[0] == 'RadialAxial' || IR[0] == 'Dummy') {
|
||||
var pattern = Pattern.shadingFromIR(this.ctx, IR);
|
||||
} else {
|
||||
throw 'Unkown IR type';
|
||||
error('Unkown IR type ' + IR[0]);
|
||||
}
|
||||
return pattern;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue