1 #ifndef BOOST_STATECHART_TEST_THROWING_BOOST_ASSERT_HPP_INCLUDED 2 #define BOOST_STATECHART_TEST_THROWING_BOOST_ASSERT_HPP_INCLUDED 3 ////////////////////////////////////////////////////////////////////////////// 4 // Copyright 2005-2006 Andreas Huber Doenni 5 // Distributed under the Boost Software License, Version 1.0. (See accompany- 6 // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 ////////////////////////////////////////////////////////////////////////////// 8 9 10 11 #include <string> 12 #include <stdexcept> 13 14 15 16 #define BOOST_ENABLE_ASSERT_HANDLER 17 18 19 20 namespace boost 21 { 22 23 assertion_failed(char const * expr,char const * func,char const * file,long)24void assertion_failed( 25 char const * expr, char const * func, char const * file, long ) 26 { 27 throw std::logic_error( 28 std::string( "\nAssertion failed: \"" ) + expr + "\"\n" + 29 "File: \"" + file + "\"\n" + 30 "Function: \"" + func + "\"\n" ); 31 } 32 33 34 35 } // namespace boost 36 37 38 39 #endif 40