Line data Source code
1 : #include "Assertions.h" 2 : #include "elsaDefines.h" 3 : 4 : namespace elsa::detail 5 : { 6 : void assert_msg(const char* expr_str, bool expr, const char* file, int line, const char* msg) 7 57365107 : { 8 57365107 : if (unlikely(not expr)) { 9 0 : std::cerr << "Assert failed:"; 10 0 : if (msg != nullptr) { 11 0 : std::cerr << "\t" << msg; 12 0 : } 13 0 : std::cerr << "\nExpected:\t" << expr_str << "\n" 14 0 : << "Source:\t\t" << file << ", line " << line << "\n"; 15 0 : abort(); 16 0 : } 17 57365107 : } 18 : } // namespace elsa::detail