]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/boost.C
updated format to 243, fix bug 1382, bug 22
[lyx.git] / src / tex2lyx / boost.C
1 /**
2  * \file boost.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "debug.h"
14
15 #include <boost/assert.hpp>
16
17 #include <cstdlib>
18 #include <exception>
19
20 using std::endl;
21
22 namespace boost {
23
24 void throw_exception(std::exception const & e)
25 {
26         lyxerr << "Exception caught:\n"
27                << e.what() << endl;
28         BOOST_ASSERT(false);
29 }
30
31
32 void assertion_failed(char const * expr, char const * function,
33                       char const * file, long line)
34 {
35         lyxerr << "Assertion triggered in " << function
36                << " by failing check \"" << expr << "\""
37                << " in file " << file << ":" << line << endl;
38         ::abort();
39 }
40
41 } // namespace boost