From b714e6447c1a5a1be9e4fd946b6937c4e2ab9f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20Sj=C3=B6green?= Date: Fri, 21 Apr 2023 10:41:28 +0200 Subject: [PATCH] fix: more descriptive error --- types/varint/leb128.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/varint/leb128.ts b/types/varint/leb128.ts index 3b5556a..3a93921 100644 --- a/types/varint/leb128.ts +++ b/types/varint/leb128.ts @@ -16,7 +16,7 @@ export class I32LEB128 implements Type { byteOffset++; if (position >= 32) { - throw new Error("VarInt is too big"); + throw new TypeError("I32LEB128 cannot exceed 32 bits in length"); } }