Skip to content

Commit

Permalink
[unity]fix #1735
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxxming authored May 29, 2024
1 parent 327dde8 commit 6323f10
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions unreal/Puerts/Source/JsEnv/Private/PromiseRejectCallback.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,20 @@ std::string StackTraceToString(v8::Isolate* InIsolate, v8::Local<v8::StackTrace>
}
else
{
stm << " at [eval] (" << *ScriptName << ":" << LineNumber << ":" << Column << ")" << std::endl;
stm << " at [eval] (" << (*ScriptName ? *ScriptName : "anonymous") << ":" << LineNumber << ":" << Column << ")"
<< std::endl;
}
break;
}

if (FuncName.length() == 0)
{
stm << " at " << *ScriptName << ":" << LineNumber << ":" << Column << std::endl;
stm << " at " << (*ScriptName ? *ScriptName : "anonymous") << ":" << LineNumber << ":" << Column << std::endl;
}
else
{
stm << " at " << *FuncName << "(" << *ScriptName << ":" << LineNumber << ":" << Column << ")" << std::endl;
stm << " at " << *FuncName << "(" << (*ScriptName ? *ScriptName : "anonymous") << ":" << LineNumber << ":" << Column
<< ")" << std::endl;
}
}
return stm.str();
Expand Down

0 comments on commit 6323f10

Please sign in to comment.