summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2024-02-26 16:00:31 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2024-02-26 16:00:31 +0100
commitc2d5180f6a6560ed9d21414ea4674793333e293b (patch)
tree7f895985027bcad5df69fb281b4b244b3efb473b
parent97818e5080600dc68c65dcf9d1cd05411dd43b20 (diff)
downloadfuzzer-c2d5180f6a6560ed9d21414ea4674793333e293b.tar.gz
log if we crash
-rwxr-xr-xrtt-module.js4
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