diff options
author | legendecas <legendecas@gmail.com> | 2021-04-01 01:31:34 +0800 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2021-04-29 13:45:34 +0200 |
commit | 17856f1f887ee9c8d91bf2ce5b772ba56948174b (patch) | |
tree | 9cc59fbff311362ba1d5c12b778cb2c6ff5ce656 /src/node_report_module.cc | |
parent | dd61a26d8c58b95e5d3cea9a30cdf85ddf0875ad (diff) | |
download | node-new-17856f1f887ee9c8d91bf2ce5b772ba56948174b.tar.gz |
src: print arbitrary javascript exception value in node report
PR-URL: https://github.com/nodejs/node/pull/38009
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'src/node_report_module.cc')
-rw-r--r-- | src/node_report_module.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node_report_module.cc b/src/node_report_module.cc index 97c6bea3ad..190755a85b 100644 --- a/src/node_report_module.cc +++ b/src/node_report_module.cc @@ -32,7 +32,7 @@ void WriteReport(const FunctionCallbackInfo<Value>& info) { Isolate* isolate = env->isolate(); HandleScope scope(isolate); std::string filename; - Local<Object> error; + Local<Value> error; CHECK_EQ(info.Length(), 4); String::Utf8Value message(isolate, info[0].As<String>()); @@ -40,10 +40,10 @@ void WriteReport(const FunctionCallbackInfo<Value>& info) { if (info[2]->IsString()) filename = *String::Utf8Value(isolate, info[2]); - if (!info[3].IsEmpty() && info[3]->IsObject()) - error = info[3].As<Object>(); + if (!info[3].IsEmpty()) + error = info[3]; else - error = Local<Object>(); + error = Local<Value>(); filename = TriggerNodeReport( isolate, env, *message, *trigger, filename, error); |