00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TA_ERROR_H
00013 #define TA_ERROR_H
00014
00015 #ifndef TA_DEBUG_H
00016 #include "Debug.h"
00017 #endif // TA_DEBUG_H
00018
00019 #ifndef TA_TYPES_H
00020 #include "Types.h"
00021 #endif // TA_TYPES_H
00022
00023 TA_OBFUSCATION_SKIP_PASS_2
00024
00025 namespace TA
00026 {
00027
00028
00029 TA_OBFUSCATION_RESERVED_ON
00030 #if defined(_DEBUG)
00031 #define TA_ERROR_REPORT_SEVERE(szString) do { TA_ASSERT(0); Error::Report(Error::LEVEL_SEVERE, szString); } while (0)
00032 #define TA_ERROR_REPORT_HARMLESS(szString) do { TA_ASSERT(0); Error::Report(Error::LEVEL_HARMLESS, szString); } while (0)
00033 #else
00034 #define TA_ERROR_REPORT_SEVERE(szString) Error::Report(Error::LEVEL_SEVERE, szString)
00035 #define TA_ERROR_REPORT_HARMLESS(szString) Error::Report(Error::LEVEL_HARMLESS, szString)
00036 #endif
00037 TA_OBFUSCATION_RESERVED_OFF
00038
00039 class Error
00040 {
00041 public:
00042 TA_OBFUSCATION_RESERVED_ON
00043 enum Level
00044 {
00045 LEVEL_HARMLESS = 0,
00046 LEVEL_SEVERE
00047 };
00048 static void TAC_CALL SetErrorReportLevel(Level eLevel);
00049 static Level TAC_CALL GetErrorReportLevel();
00050
00051 static void TAC_CALL Report(Level eLevel, const Char* szString);
00052 TA_OBFUSCATION_RESERVED_OFF
00053
00054 private:
00055 static Level s_eLevel;
00056 };
00057
00058 inline Error::Level TAC_CALL Error::GetErrorReportLevel() { return s_eLevel; }
00059
00060 }
00061
00062 #endif // TA_ERROR_H
© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.