mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 15:26:59 +00:00
cleanup and add comments to traceback feature
This commit is contained in:
parent
6f4c3f0ceb
commit
9db3619cd8
@ -1161,10 +1161,9 @@ void TLuaEngine::StateThreadData::operator()() {
|
||||
if (Error.has_value()) {
|
||||
ErrorString = Error.value();
|
||||
}
|
||||
auto DebugTracebackFn = sol::state_view(L).globals()
|
||||
.get<sol::table>("debug")
|
||||
.get<sol::protected_function>("traceback");
|
||||
std::string Traceback = DebugTracebackFn(ErrorString, 2); // refusing to elaborate. questions? rtfm.
|
||||
auto DebugTracebackFn = sol::state_view(L).globals().get<sol::table>("debug").get<sol::protected_function>("traceback");
|
||||
// 2 = start collecting the trace one above the current function (1=current function)
|
||||
std::string Traceback = DebugTracebackFn(ErrorString, 2);
|
||||
return sol::stack::push(L, Traceback);
|
||||
};
|
||||
sol::protected_function Fn(RawFn, StateView["INTERNAL_ERROR_HANDLER"]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user