2008-05-05 12:36:31 +00:00
|
|
|
#include <iostream>
|
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
|
|
|
|
void Assimp::aiAssert (bool expression, const std::string &message, unsigned int uiLine, const std::string &file)
|
|
|
|
{
|
|
|
|
if (!expression)
|
|
|
|
{
|
2008-08-06 23:01:38 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|