Skip to content
This repository was archived by the owner on Jun 18, 2021. It is now read-only.

Commit fd29aa1

Browse files
hhellyerrnchamberlain
authored andcommitted
node_report.cc: Fix CreateMessage call
This change fixes a compile failure caused by using a version of v8::Exception::CreateMessage that does not exist on Node.js releases earlier than 6. On 6 and later the older version of CreateMessage is deprecated so the new version is used. PR-URL: #88 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Richard Chamberlain <[email protected]>
1 parent b20b236 commit fd29aa1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/node_report.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,11 @@ static void PrintJavaScriptErrorStack(std::ostream& out, Isolate* isolate, Maybe
805805

806806
out << "\n================================================================================";
807807
out << "\n==== JavaScript Exception Details ==============================================\n\n";
808+
#if NODE_MAJOR_VERSION > 5
808809
Local<Message> message = v8::Exception::CreateMessage(isolate, error.ToLocalChecked());
810+
#else
811+
Local<Message> message = v8::Exception::CreateMessage(error.ToLocalChecked());
812+
#endif
809813
Nan::Utf8String message_str(message->Get());
810814

811815
out << *message_str << "\n\n";

0 commit comments

Comments
 (0)