#include "lyx_main.h"
#include "debug.h"
+#include "support/lyxlib.h"
#include <boost/assert.hpp>
void emergencyCleanup()
{
- static bool didCleanup;
- if (didCleanup)
- return;
+ static bool didCleanup;
+ if (didCleanup)
+ return;
- didCleanup = true;
+ didCleanup = true;
- LyX::emergencyCleanup();
+ LyX::cref().emergencyCleanup();
}
}
void assertion_failed(char const * expr, char const * function,
char const * file, long line)
{
- lyxerr << "Assertion triggered in " << function << " by \"" <<
- expr << " in file " << file << ":" << line << endl;
+ lyxerr << "Assertion triggered in " << function
+ << " by failing check \"" << expr << "\""
+ << " in file " << file << ":" << line << endl;
emergencyCleanup();
- assert(false);
+ lyx::support::abort();
}