Skip to content

Commit

Permalink
fix: more descriptive error
Browse files Browse the repository at this point in the history
  • Loading branch information
eliassjogreen authored Apr 21, 2023
1 parent cf2a1b4 commit b714e64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/varint/leb128.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class I32LEB128 implements Type<number> {
byteOffset++;

if (position >= 32) {
throw new Error("VarInt is too big");
throw new TypeError("I32LEB128 cannot exceed 32 bits in length");
}
}

Expand Down

0 comments on commit b714e64

Please sign in to comment.