Not so soon, I guess, since that FIXME was from r6305.
[lyx.git] / src / boost.cpp
blob7ae7433a1bea38ca2e537682e457789fba571ef3
1 /**
2 * \file boost.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS.
9 */
11 #include <config.h>
13 #include "LyX.h"
15 #include "support/debug.h"
17 #include "support/lassert.h"
19 #include <exception>
20 #include <iomanip>
21 #include <iostream>
23 using namespace std;
24 using lyx::lyxerr;
26 namespace boost {
28 #ifndef BOOST_NO_EXCEPTIONS
29 void throw_exception(std::exception const & e)
31 lyxerr << "Exception caught:\n" << e.what() << endl;
32 LASSERT(false, /**/);
34 #endif
37 void assertion_failed(char const * expr, char const * function,
38 char const * file, long line)
40 lyxerr << "Assertion triggered in " << function
41 << " by failing check \"" << expr << "\""
42 << " in file " << file << ":" << line << endl;
44 // FIXME: by default we exit here but we could also inform the user
45 // about the assertion and do the emergency cleanup without exiting.
46 // FIXME: do we have a list of exit codes defined somewhere?
47 lyx::lyx_exit(1);
50 } // namespace boost