mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Replaced occurence of throw new Error
with unreachable
where applicable
This commit is contained in:
parent
b327633ad6
commit
1135674647
12 changed files with 41 additions and 32 deletions
|
@ -34,14 +34,14 @@ var ShadingType = {
|
|||
var Pattern = (function PatternClosure() {
|
||||
// Constructor should define this.getPattern
|
||||
function Pattern() {
|
||||
throw new Error('should not call Pattern constructor');
|
||||
unreachable('should not call Pattern constructor');
|
||||
}
|
||||
|
||||
Pattern.prototype = {
|
||||
// Input: current Canvas context
|
||||
// Output: the appropriate fillStyle or strokeStyle
|
||||
getPattern: function Pattern_getPattern(ctx) {
|
||||
throw new Error(`Should not call Pattern.getStyle: ${ctx}`);
|
||||
unreachable(`Should not call Pattern.getStyle: ${ctx}`);
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue