mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-13 03:21:43 +00:00
[Server] Add error message as argument to OnServerScriptCrash
This commit is contained in:
parent
552a94a0ca
commit
986528c67d
3 changed files with 3 additions and 3 deletions
|
@ -105,7 +105,7 @@ public:
|
||||||
catch (std::exception &e)
|
catch (std::exception &e)
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
||||||
Script::Call<Script::CallbackIdentity("OnServerScriptCrash")>();
|
Script::Call<Script::CallbackIdentity("OnServerScriptCrash")>(e.what());
|
||||||
|
|
||||||
if (!mwmp::Networking::getPtr()->getScriptErrorIgnoringState())
|
if (!mwmp::Networking::getPtr()->getScriptErrorIgnoringState())
|
||||||
throw;
|
throw;
|
||||||
|
|
|
@ -156,7 +156,7 @@ public:
|
||||||
{"OnServerInit", Callback<>()},
|
{"OnServerInit", Callback<>()},
|
||||||
{"OnServerPostInit", Callback<>()},
|
{"OnServerPostInit", Callback<>()},
|
||||||
{"OnServerExit", Callback<bool>()},
|
{"OnServerExit", Callback<bool>()},
|
||||||
{"OnServerScriptCrash", Callback<>()},
|
{"OnServerScriptCrash", Callback<const char*>()},
|
||||||
{"OnPlayerConnect", Callback<unsigned short>()},
|
{"OnPlayerConnect", Callback<unsigned short>()},
|
||||||
{"OnPlayerDisconnect", Callback<unsigned short>()},
|
{"OnPlayerDisconnect", Callback<unsigned short>()},
|
||||||
{"OnPlayerDeath", Callback<unsigned short>()},
|
{"OnPlayerDeath", Callback<unsigned short>()},
|
||||||
|
|
|
@ -307,7 +307,7 @@ int main(int argc, char *argv[])
|
||||||
catch (std::exception &e)
|
catch (std::exception &e)
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
||||||
Script::Call<Script::CallbackIdentity("OnServerScriptCrash")>();
|
Script::Call<Script::CallbackIdentity("OnServerScriptCrash")>(e.what());
|
||||||
throw; //fall through
|
throw; //fall through
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue