#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "Debug.hpp" #include "Configs.hpp" SIMCErrorContainer errorContainer; extern Configs theConfigs; void _coreASSERT(const char *filename, int line, const char *errMsg, void (*cleanup)()) { const char *name; name = strrchr(filename, '\\'); if (name != NULL) filename = name+1; cout << "Err [" << filename << ":" << line << "] - " << errMsg << "\n"; if (cleanup != NULL) (*cleanup)(); } void dumpOnBuild() { SIMCErrorMessage errorMessage; if ( (theConfigs.m_dwFlags & (CFG_VERB_ERROR | CFG_VERB_WARNING)) == 0 ) return; for (errorContainer.MoveToFirstMessage(); errorContainer.GetNextMessage(errorMessage) && theConfigs.m_nMaxErrors > 0; ) { switch (errorMessage.GetSeverityLevel()) { case 0: if (theConfigs.m_dwFlags & CFG_VERB_ERROR) { cout << errorMessage; theConfigs.m_nMaxErrors--; } break; case 1: if (theConfigs.m_dwFlags & CFG_VERB_WARNING) { cout << errorMessage; theConfigs.m_nMaxErrors--; } break; } } }