Better error handling
This commit is contained in:
parent
b390363b25
commit
e3b3f8fac1
25 changed files with 52 additions and 52 deletions
|
@ -14,6 +14,6 @@ export function genId(date?: Date): string {
|
|||
case 'meid': return genMeid(date);
|
||||
case 'ulid': return ulid(date.getTime());
|
||||
case 'objectid': return genObjectId(date);
|
||||
default: throw 'unknown id generation method';
|
||||
default: throw new Error('unknown id generation method');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue