From 87b222a240437e650d70f3d299d7795fd1ab38ff Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Tue, 16 Feb 2021 19:47:43 +0100 Subject: [PATCH] Display current passage in error messages as well. This is to make sure bad quality big reports have more data to go on. --- src/js/utilsDOM.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/utilsDOM.js b/src/js/utilsDOM.js index 9d50e766450..439e15dbbf6 100644 --- a/src/js/utilsDOM.js +++ b/src/js/utilsDOM.js @@ -475,7 +475,8 @@ App.UI.DOM.formatException = function formatException(ex, recursion = false) { function render() { const fragment = document.createDocumentFragment(); - App.UI.DOM.appendNewElement("p", fragment, `${ex.name}: ${ex.message}; ${Config.saves.version}`, ["bold", "error"]); + App.UI.DOM.appendNewElement("p", fragment, + `${ex.name}: ${ex.message}; Passage: ${passage()}; Version: ${Config.saves.version}`, ["bold", "error"]); const p = document.createElement("p"); const lines = ex.stack.split("\n"); -- GitLab