Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
92
GameTools/CaldronBase/ExceptionMgr.h
Normal file
92
GameTools/CaldronBase/ExceptionMgr.h
Normal file
@@ -0,0 +1,92 @@
|
||||
#include "Caldron.h"
|
||||
#include <dbghelp.h>
|
||||
|
||||
/* *********************************************************************
|
||||
|
||||
* CExceptionMgr
|
||||
* 파일 : CException Mgr.h
|
||||
* 기능 : Caldron Engine내 Dbghelp와 LogMgr을 이용한 exception 출력 루틴.
|
||||
* 작성일 : 2004.02.11
|
||||
* 작성자 : wizardbug ( 2004.02.11)
|
||||
* 수정자 :
|
||||
* 개요 : Exception 핸들링 루틴은 microsoft 기술 칼럼 ' under the hood' 의 예제의 루틴 변형한 것임.
|
||||
********************************************************************** */
|
||||
|
||||
#pragma once
|
||||
namespace Caldron {
|
||||
namespace Base {
|
||||
// Stolen from Dbg Help Example
|
||||
enum BasicType
|
||||
{
|
||||
btNoType = 0,
|
||||
btVoid = 1,
|
||||
btChar = 2,
|
||||
btWChar = 3,
|
||||
btInt = 6,
|
||||
btUInt = 7,
|
||||
btFloat = 8,
|
||||
btBCD = 9,
|
||||
btBool = 10,
|
||||
btLong = 13,
|
||||
btULong = 14,
|
||||
btCurrency = 25,
|
||||
btDate = 26,
|
||||
btVariant = 27,
|
||||
btComplex = 28,
|
||||
btBit = 29,
|
||||
btBSTR = 30,
|
||||
btHresult = 31
|
||||
};
|
||||
|
||||
class CExceptionMgr
|
||||
{
|
||||
public:
|
||||
CExceptionMgr(void);
|
||||
~CExceptionMgr(void);
|
||||
|
||||
// entry point where control comes on an unhandled exception
|
||||
static LONG WINAPI ExceptionFilter(PEXCEPTION_POINTERS pExceptionInfo );
|
||||
static void WriteExceptionReport(PEXCEPTION_POINTERS pExceptionInfo );
|
||||
static LPSTR GetExceptionString(DWORD dwCode);
|
||||
static BOOL GetLogicalAddress(PVOID addr, PTSTR szModule, DWORD len,DWORD& section, DWORD& offset);
|
||||
static void WriteCallStack(PCONTEXT pContext,bool bWriteVariables );
|
||||
static BOOL CALLBACK EnumerateSymbolsCallback(PSYMBOL_INFO,ULONG, PVOID);
|
||||
|
||||
static bool FormatSymbolValue( PSYMBOL_INFO, STACKFRAME *, char * pszBuffer, unsigned cbBuffer );
|
||||
static char * DumpTypeIndex( char *, DWORD64, DWORD, unsigned, DWORD_PTR, bool & );
|
||||
static char * FormatOutputValue( char * pszCurrBuffer, BasicType basicType, DWORD64 length, PVOID pAddress );
|
||||
static BasicType GetBasicType( DWORD typeIndex, DWORD64 modBase );
|
||||
|
||||
protected:
|
||||
static LPTOP_LEVEL_EXCEPTION_FILTER m_lpPrevFilter;
|
||||
static HANDLE m_hProcess;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// where report info is extracted and generated
|
||||
static void GenerateExceptionReport( PEXCEPTION_POINTERS pExceptionInfo );
|
||||
|
||||
// Helper functions
|
||||
|
||||
static void WriteStackDetails( PCONTEXT pContext, bool bWriteVariables );
|
||||
|
||||
|
||||
|
||||
|
||||
static int __cdecl _tprintf(const TCHAR * format, ...);
|
||||
|
||||
};
|
||||
|
||||
|
||||
extern WheatyExceptionReport g_WheatyExceptionReport; // global instance of class
|
||||
|
||||
*/
|
||||
}}
|
||||
Reference in New Issue
Block a user