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:
parent
82ecc83951
commit
482eea8fd1
1 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue