* @brief Boost failed assertion handler, with message * * @internal * If the macro \c BOOST_ENABLE_ASSERT_HANDLER is defined when * is included, instead of sending a error * message to an output stream, the expression * ::boost::assertion_failed_msg(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) * is evaluated. */
| 26 | * is evaluated. |
| 27 | */ |
| 28 | inline |
| 29 | void |
| 30 | assertion_failed_msg(char const *inExpr, char const *inMsg, |
| 31 | char const *inFunction, char const *inFile, long inLine) { |
| 32 | |
| 33 | std::stringstream tmp; |
| 34 | tmp << inMsg |
| 35 | << "\nDetails (for developers): \n" |
| 36 | "Failed BOOST_ASSERT: " << inExpr << |
| 37 | "\nFunction: " << inFunction << |
| 38 | "\nFile: " << inFile << ":" << inLine; |
| 39 | |
| 40 | throw std::runtime_error( tmp.str() ); |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * @brief Boost failed assertion handler, without message |