Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/statechart/test/ThrowingBoostAssert.hpp @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 877 bytes
Line 
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
20namespace boost
21{
22
23
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
Note: See TracBrowser for help on using the repository browser.