File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
third_party/tonic/logging Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,14 @@ const char kInvalidArgument[] = "Invalid argument.";
1414
1515bool LogIfError (Dart_Handle handle) {
1616 if (Dart_IsUnhandledExceptionError (handle)) {
17+ Dart_Handle exception_handle = Dart_ErrorGetException (handle);
18+ const std::string exception =
19+ tonic::StdStringFromDart (Dart_ToString (exception_handle));
1720 Dart_Handle stack_trace_handle = Dart_ErrorGetStackTrace (handle);
1821 const std::string stack_trace =
1922 tonic::StdStringFromDart (Dart_ToString (stack_trace_handle));
20- tonic::Log (" Dart Unhandled Exception: %s" , stack_trace.c_str ());
23+ tonic::Log (" Dart Unhandled Exception: %s, stack trace: %s" ,
24+ exception.c_str (), stack_trace.c_str ());
2125 return true ;
2226 } else if (Dart_IsError (handle)) {
2327 tonic::Log (" Dart Error: %s" , Dart_GetError (handle));
You can’t perform that action at this time.
0 commit comments