better error

This commit is contained in:
MathMan05
2026-06-26 23:33:39 -05:00
parent c96fe06437
commit 579e4abca9
+3 -1
View File
@@ -10,7 +10,9 @@ abstract class SnowFlake {
try {
return Number((BigInt(str) >> 22n) + 1420070400000n);
} catch {
throw new Error(`The ID is corrupted, it's ${str} when it should be some number.`);
throw new Error(
`The ID is corrupted, it's ${JSON.stringify(str)} when it should be some number.`,
);
}
}
static DateToID(date: Date) {