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.
15 #include "support/debug.h"
16 #include "support/lyxlib.h"
18 #include <boost/assert.hpp>
29 #ifndef BOOST_NO_EXCEPTIONS
30 void throw_exception(std::exception const & e)
32 lyxerr << "Exception caught:\n" << e.what() << endl;
38 void emergencyCleanup()
40 static bool didCleanup;
46 LyX::cref().emergencyCleanup();
50 void assertion_failed(char const * expr, char const * function,
51 char const * file, long line)
53 lyxerr << "Assertion triggered in " << function
54 << " by failing check \"" << expr << "\""
55 << " in file " << file << ":" << line << endl;
57 lyx::support::abort();