diff --git a/scripts/interface.js b/scripts/interface.js index 2ecf0d7..6033173 100644 --- a/scripts/interface.js +++ b/scripts/interface.js @@ -413,6 +413,13 @@ class FormElement extends InterfaceElement { this.handle.after(box); this.alerts.push(box); } + handleError(e, extraInfo="") { + if (extraInfo !== "") { + extraInfo = ` (${extraInfo})`; + } + this.alertBox("alert-error", e.message + extraInfo); + console.error(e); + } clearAlerts() { for (const box of this.alerts) { box.remove();