mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 15:19:56 +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)
|
||||
return callMethodPromise && childrenPromise ? Promise.all([callMethodPromise, childrenPromise]) : callMethodPromise || childrenPromise;
|
||||
} catch (e: any) {
|
||||
console.error(`Handling of event '${name}' failed in ${this.constructor.name} with error ${e.message} ${e.stack}`);
|
||||
} catch (e: unknown) {
|
||||
console.error(`Handling of event '${name}' failed in ${this.constructor.name} with error`, e);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user