File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ const std::string GetCurrentScriptUrl(v8::Isolate* isolate);
6565
6666bool LiveSync (v8::Isolate* isolate);
6767
68- void Assert (bool condition, v8::Isolate* isolate = nullptr );
68+ void Assert (bool condition, v8::Isolate* isolate = nullptr , std::string const &reason = std::string() );
6969
7070}
7171
Original file line number Diff line number Diff line change 657657 return true ;
658658}
659659
660- void tns::Assert (bool condition, Isolate* isolate) {
660+ void tns::Assert (bool condition, Isolate* isolate, std::string const &reason ) {
661661 if (!RuntimeConfig.IsDebug ) {
662662 assert (condition);
663663 return ;
676676
677677 if (isolate == nullptr ) {
678678 Log (@" ====== Assertion failed ======" );
679+ if (!reason.empty ()) {
680+ Log (@" Reason: %s " , reason.c_str ());
681+ }
679682 Log (@" Native stack trace:" );
680683 LogBacktrace ();
681684 assert (false );
You can’t perform that action at this time.
0 commit comments