Commit 09f0b541 authored by Davis King's avatar Davis King

Changed wording of assertion failure message to emphasize that a failed assertion

means that an error has been detected, not that the assert itself is the error.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403687
parent d1c333eb
...@@ -71,9 +71,9 @@ namespace dlib ...@@ -71,9 +71,9 @@ namespace dlib
{ \ { \
dlib_assert_breakpoint(); \ dlib_assert_breakpoint(); \
std::ostringstream dlib__out; \ std::ostringstream dlib__out; \
dlib__out << "\n\nError occurred at line " << __LINE__ << ".\n"; \ dlib__out << "\n\nError detected at line " << __LINE__ << ".\n"; \
dlib__out << "Error occurred in file " << __FILE__ << ".\n"; \ dlib__out << "Error detected in file " << __FILE__ << ".\n"; \
dlib__out << "Error occurred in function " << DLIB_FUNCTION_NAME << ".\n\n"; \ dlib__out << "Error detected in function " << DLIB_FUNCTION_NAME << ".\n\n"; \
dlib__out << "Failing expression was " << #_exp << ".\n"; \ dlib__out << "Failing expression was " << #_exp << ".\n"; \
dlib__out << std::boolalpha << _message << "\n"; \ dlib__out << std::boolalpha << _message << "\n"; \
throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib__out.str()); \ throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib__out.str()); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment