mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 07:09:54 +01:00
chore(client): improve error handling message in events
This commit is contained in:
@@ -65,8 +65,8 @@ export class TypedComponent<ChildT extends TypedComponent<ChildT>> {
|
|||||||
|
|
||||||
// don't create promises if not needed (optimization)
|
// don't create promises if not needed (optimization)
|
||||||
return callMethodPromise && childrenPromise ? Promise.all([callMethodPromise, childrenPromise]) : callMethodPromise || childrenPromise;
|
return callMethodPromise && childrenPromise ? Promise.all([callMethodPromise, childrenPromise]) : callMethodPromise || childrenPromise;
|
||||||
} catch (e: any) {
|
} catch (e: unknown) {
|
||||||
console.error(`Handling of event '${name}' failed in ${this.constructor.name} with error ${e.message} ${e.stack}`);
|
console.error(`Handling of event '${name}' failed in ${this.constructor.name} with error`, e);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user