You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-24 23:26:50 +02:00
Tools: Apply rule @typescript-eslint/type-annotation-spacing
This commit is contained in:
@ -3,9 +3,9 @@
|
||||
// This wraps an error message, allowing to set a prefix,
|
||||
// while preserving all the important properties
|
||||
// in particular the stack trace and original error message.
|
||||
export function wrapError(prefix:string, error:any) {
|
||||
export function wrapError(prefix: string, error: any) {
|
||||
if (!error) throw new Error('Unknown error');
|
||||
const newError:any = new Error([prefix, error.message || ''].join(': '));
|
||||
const newError: any = new Error([prefix, error.message || ''].join(': '));
|
||||
|
||||
if ('name' in error) newError.name = error.name;
|
||||
if ('fileName' in error) newError.fileName = error.fileName;
|
||||
|
Reference in New Issue
Block a user