Skip to content

Commit a0da938

Browse files
committed
fixed error message
1 parent d16a55f commit a0da938

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/decoder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jpeg.lossless.Decoder.prototype.decode = function () {
107107
current = this.stream.get16();
108108

109109
if (current !== 0xFFD8) { // SOI
110-
this.error = "Not a JPEG file";
110+
throw new Error("Not a JPEG file");
111111
}
112112

113113
current = this.stream.get16();

0 commit comments

Comments
 (0)