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"
17 #include "support/lassert.h"
27 #ifndef BOOST_NO_EXCEPTIONS
28 void throw_exception(exception const & e)
30 lyxerr << "Exception caught:\n" << e.what() << endl;
36 void assertion_failed(char const * expr, char const * function,
37 char const * file, long line)
39 lyxerr << "Assertion triggered in " << function
40 << " by failing check \"" << expr << "\""
41 << " in file " << file << ":" << line << endl;
43 // FIXME: by default we exit here but we could also inform the user
44 // about the assertion and do the emergency cleanup without exiting.
45 // FIXME: do we have a list of exit codes defined somewhere?
49 void assertion_failed_msg(char const * expr, char const * msg,
50 char const * function, char const * file, long line)
52 lyxerr << "Assertion triggered in " << function
53 << " by failing check \"" << expr << "\""
54 << " with message \"" << msg << "\""
55 << " in file " << file << ":" << line << endl;
57 // FIXME: by default we exit here but we could also inform the user
58 // about the assertion and do the emergency cleanup without exiting.
59 // FIXME: do we have a list of exit codes defined somewhere?