2008-10-13 16:45:48 +00:00
|
|
|
|
2008-10-19 19:51:24 +00:00
|
|
|
#include "AssimpPCH.h"
|
2008-10-13 16:45:48 +00:00
|
|
|
|
2008-05-21 15:35:28 +00:00
|
|
|
#include "../include/aiAssert.h"
|
2008-05-05 12:36:31 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#ifndef __GNUC__
|
|
|
|
# include "crtdbg.h"
|
|
|
|
#endif //ndef gcc
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Set a breakpoint using win32, else line, file and message will be returned and progam ends with
|
|
|
|
// errrocode = 1
|
2010-01-06 22:04:31 +00:00
|
|
|
void Assimp::aiAssert (const std::string &message, unsigned int uiLine, const std::string &file)
|
2008-05-05 12:36:31 +00:00
|
|
|
{
|
2010-01-06 22:04:31 +00:00
|
|
|
// moved expression testing out of the function and into the macro to avoid constructing
|
|
|
|
// two std::string on every single ai_assert test
|
|
|
|
// if (!expression)
|
|
|
|
{
|
|
|
|
// FIX (Aramis): changed std::cerr to std::cout that the message appears in VS' output window ...
|
|
|
|
std::cout << "File :" << file << ", line " << uiLine << " : " << message << std::endl;
|
2008-05-05 12:36:31 +00:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
#ifndef __GNUC__
|
|
|
|
// Set breakpoint
|
|
|
|
__debugbreak();
|
|
|
|
#endif //ndef gcc
|
|
|
|
#else
|
|
|
|
exit (1);
|
|
|
|
#endif
|
|
|
|
}
|
2008-09-12 20:25:11 +00:00
|
|
|
}
|