feat: add OnError event

This commit is contained in:
Axel Cocat
2023-05-31 03:09:30 +02:00
parent 974083ba62
commit 4fb0949ddf
2 changed files with 3 additions and 0 deletions

View File

@@ -579,6 +579,7 @@ int Eluna::StackTrace(lua_State *_L)
// dirty stack?
// Stack: errmsg, debug, tracemsg
sEluna->OnError(std::string(lua_tostring(_L, -1)));
return 1;
}

View File

@@ -23,6 +23,7 @@
#include "LFG.h"
#include "ElunaUtility.h"
#include "HttpManager.h"
#include "EventEmitter.h"
#include <mutex>
#include <memory>
@@ -241,6 +242,7 @@ public:
EventMgr* eventMgr;
HttpManager httpManager;
QueryCallbackProcessor queryProcessor;
EventEmitter<void(std::string)> OnError;
BindingMap< EventKey<Hooks::ServerEvents> >* ServerEventBindings;
BindingMap< EventKey<Hooks::PlayerEvents> >* PlayerEventBindings;