mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-07-21 06:51:00 +00:00
better error
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user