Add logger that encapsulates console logging
This commit is contained in:
parent
1f6d13c49d
commit
a987b59b65
12 changed files with 92 additions and 57 deletions
|
@ -45,5 +45,5 @@ export async function rollCheck(check: Check): Promise<void> {
|
|||
return notifications.warn(game.i18n.localize("DS4.WarningMustControlActorToUseRollCheckMacro"));
|
||||
}
|
||||
|
||||
return actor.rollCheck(check);
|
||||
return actor.rollCheck(check).catch((e) => notifications.error(e, { log: true }));
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ export async function rollGenericCheck(): Promise<void> {
|
|||
return notifications.warn(game.i18n.localize("DS4.WarningMustControlActorToUseRollCheckMacro"));
|
||||
}
|
||||
|
||||
return actor.rollGenericCheck();
|
||||
return actor.rollGenericCheck().catch((e) => notifications.error(e, { log: true }));
|
||||
}
|
||||
|
|
|
@ -53,5 +53,5 @@ export async function rollItem(itemId: string): Promise<void> {
|
|||
);
|
||||
}
|
||||
|
||||
return item.roll();
|
||||
return item.roll().catch((e) => notifications.error(e, { log: true }));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue