Skip to content

Commit e47cbd4

Browse files
committed
core, bugfix: error report crash when stack trace return empty.
1 parent c2d0423 commit e47cbd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fibjs/src/base/utils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ exlib::string GetException(TryCatch& try_catch, result_t hr, bool repl)
210210
if (err_obj->IsNativeError()) {
211211
v8::Local<v8::Value> stack_trace_string;
212212
try_catch.StackTrace(context).ToLocal(&stack_trace_string);
213-
strError.append(isolate->toString(stack_trace_string));
213+
if (!stack_trace_string.IsEmpty())
214+
strError.append(isolate->toString(stack_trace_string));
214215
} else {
215216
JSValue message;
216217
JSValue name;

0 commit comments

Comments
 (0)