mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Convert the various image decoder ...Error
s to classes extending BaseException
(PR 11185 follow-up)
Somehow I missed these in PR 11185, but there's no good reason not to convert them as well.
This commit is contained in:
parent
8c4f4b5eec
commit
572abdcb4a
3 changed files with 22 additions and 54 deletions
|
@ -14,21 +14,15 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
info, log2, readUint16, readUint32, warn
|
||||
BaseException, info, log2, readUint16, readUint32, warn
|
||||
} from '../shared/util';
|
||||
import { ArithmeticDecoder } from './arithmetic_decoder';
|
||||
|
||||
let JpxError = (function JpxErrorClosure() {
|
||||
function JpxError(msg) {
|
||||
this.message = 'JPX error: ' + msg;
|
||||
class JpxError extends BaseException {
|
||||
constructor(msg) {
|
||||
super(`JPX error: ${msg}`);
|
||||
}
|
||||
|
||||
JpxError.prototype = new Error();
|
||||
JpxError.prototype.name = 'JpxError';
|
||||
JpxError.constructor = JpxError;
|
||||
|
||||
return JpxError;
|
||||
})();
|
||||
}
|
||||
|
||||
var JpxImage = (function JpxImageClosure() {
|
||||
// Table E.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue