File tree 1 file changed +5
-1
lines changed
third_party/tonic/logging 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.";
14
14
15
15
bool LogIfError (Dart_Handle handle) {
16
16
if (Dart_IsUnhandledExceptionError (handle)) {
17
+ Dart_Handle exception_handle = Dart_ErrorGetException (handle);
18
+ const std::string exception =
19
+ tonic::StdStringFromDart (Dart_ToString (exception_handle));
17
20
Dart_Handle stack_trace_handle = Dart_ErrorGetStackTrace (handle);
18
21
const std::string stack_trace =
19
22
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 ());
21
25
return true ;
22
26
} else if (Dart_IsError (handle)) {
23
27
tonic::Log (" Dart Error: %s" , Dart_GetError (handle));
You can’t perform that action at this time.
0 commit comments