1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 14:07:46 +00:00

override StackWalker OnOutput to write to output using our logger util

This commit is contained in:
NotAdam 2019-03-27 17:58:11 +11:00
parent 82ecc83951
commit 482eea8fd1

View file

@ -8,8 +8,20 @@
#include <cxxabi.h>
#else
#include <stackwalker/StackWalker.h>
class SapphireStackWalker : public StackWalker
{
public:
SapphireStackWalker() : StackWalker() {}
protected:
virtual void OnOutput( LPCSTR szText )
{
Logger::critical( szText );
}
};
#endif
using namespace Sapphire::Common;
Util::CrashHandler::CrashHandler()
@ -137,7 +149,7 @@ void Util::CrashHandler::printStackTrace( unsigned int max_frames )
#else
StackWalker sw;
SapphireStackWalker sw;
sw.ShowCallstack();
#endif