Add logger that encapsulates console logging

This commit is contained in:
Johannes Loher 2021-06-26 14:32:40 +02:00
parent 1f6d13c49d
commit a987b59b65
12 changed files with 92 additions and 57 deletions

View file

@ -235,7 +235,7 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Data<DS4Actor>> {
event.preventDefault();
const id = $(event.currentTarget).parents(".item").data("itemId");
const item = this.actor.getOwnedItem(id);
item.roll();
item.roll().catch((e) => notifications.error(e, { log: true }));
}
/**
@ -245,7 +245,7 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Data<DS4Actor>> {
protected _onRollCheck(event: JQuery.ClickEvent): void {
event.preventDefault();
const check = event.currentTarget.dataset["check"];
this.actor.rollCheck(check);
this.actor.rollCheck(check).catch((e) => notifications.error(e, { log: true }));
}
/** @override */