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

@ -18,7 +18,8 @@ import {
assert, createPromiseCapability, getVerbosityLevel, info, InvalidPDFException,
isArrayBuffer, isSameOrigin, loadJpegStream, MessageHandler,
MissingPDFException, NativeImageDecoding, PageViewport, PasswordException,
stringToBytes, UnexpectedResponseException, UnknownErrorException, Util, warn
stringToBytes, UnexpectedResponseException, UnknownErrorException,
unreachable, Util, warn
} from '../shared/util';
import {
DOMCanvasFactory, DOMCMapReaderFactory, DummyStatTimer, getDefaultSetting,
@ -475,7 +476,7 @@ var PDFDataRangeTransport = (function pdfDataRangeTransportClosure() {
requestDataRange:
function PDFDataRangeTransport_requestDataRange(begin, end) {
throw new Error('Abstract method PDFDataRangeTransport.requestDataRange');
unreachable('Abstract method PDFDataRangeTransport.requestDataRange');
},
abort: function PDFDataRangeTransport_abort() {