From c2d5180f6a6560ed9d21414ea4674793333e293b Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:00:31 +0100 Subject: log if we crash --- rtt-module.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtt-module.js b/rtt-module.js index 764e6e0..8525546 100755 --- a/rtt-module.js +++ b/rtt-module.js @@ -205,10 +205,12 @@ function log_crash(error, ctx, action=undefined, args=undefined) { line += " MSG=" + JSON.stringify(error.message.replace(/^Error: /, '')) if (!fs.existsSync(out_file)) { - fs.writeFileSync(out_file, JSON.stringify(game)) console.log(line) + fs.writeFileSync(out_file, JSON.stringify(game)) if (NO_CRASH) fs.writeFileSync(crash_file, ctx.data) + } else if (!NO_CRASH) { + console.log(line) } if (!NO_CRASH) { throw error -- cgit v1.2.3