]> git.lyx.org Git - lyx.git/blobdiff - src/boost.C
gettext support, fast_start option, scons all, mingw bug fix and some cleanup for...
[lyx.git] / src / boost.C
index b6b4ae38ceb09d71545ffa5da396e1d225aa9bec..217649650b45f6b2f1ec7d7dc3e912785cd04f34 100644 (file)
@@ -22,25 +22,26 @@ using std::endl;
 
 namespace boost {
 
+#ifndef BOOST_NO_EXCEPTIONS
 void throw_exception(std::exception const & e)
 {
        lyxerr << "Exception caught:\n"
            << e.what() << endl;
        BOOST_ASSERT(false);
 }
-
+#endif
 
 namespace {
 
 void emergencyCleanup()
 {
-        static bool didCleanup;
-        if (didCleanup)
-                return;
+       static bool didCleanup;
+       if (didCleanup)
+               return;
 
-        didCleanup = true;
+       didCleanup = true;
 
-        LyX::emergencyCleanup();
+       LyX::cref().emergencyCleanup();
 }
 
 }
@@ -49,8 +50,9 @@ void 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();
        lyx::support::abort();
 }