1
0
Fork 0
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:
Naveen Jain 2017-12-13 19:21:45 +05:30
parent b327633ad6
commit 1135674647
12 changed files with 41 additions and 32 deletions

View file

@ -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}`);
},
};