aiAssert.cpp 727 B

1234567891011121314151617181920212223242526272829
  1. #include "AssimpPCH.h"
  2. #include "../include/aiAssert.h"
  3. #ifdef _WIN32
  4. #ifndef __GNUC__
  5. # include "crtdbg.h"
  6. #endif //ndef gcc
  7. #endif
  8. // Set a breakpoint using win32, else line, file and message will be returned and progam ends with
  9. // errrocode = 1
  10. void Assimp::aiAssert (bool expression, const std::string &message, unsigned int uiLine, const std::string &file)
  11. {
  12. if (!expression)
  13. {
  14. // FIX (Aramis): changed std::cerr to std::cout that the message appears in VS' output window ...
  15. std::cout << "File :" << file << ", line " << uiLine << " : " << message << std::endl;
  16. #ifdef _WIN32
  17. #ifndef __GNUC__
  18. // Set breakpoint
  19. __debugbreak();
  20. #endif //ndef gcc
  21. #else
  22. exit (1);
  23. #endif
  24. }
  25. }