diff options
-rwxr-xr-x | rtt-module.js | 4 |
1 files changed, 3 insertions, 1 deletions
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 |