add util.inspect data to 'type not printable'. Add test to cover these lines (no existing test).

This commit is contained in:
Simon Hailes
2019-11-02 12:37:07 +00:00
parent d46531def8
commit 74d760a46d
2 changed files with 48 additions and 1 deletions

View File

@@ -755,7 +755,7 @@ function encodeObject(msg,opts) {
}," ");
} else {
try { msg.msg = msg.msg.toString(); }
catch(e) { msg.msg = "[Type not printable]"; }
catch(e) { msg.msg = "[Type not printable]" + util.inspect(msg.msg); }
}
}
} else if (msgType === "function") {