]> git.lyx.org Git - lyx.git/blobdiff - src/boost.C
* Painter.h:
[lyx.git] / src / boost.C
index 440b4ffd931aa6cd99d44b0e8c1d370b5eab121a..b335e31c711f8b5d3e6e690718d2da3d6429f4ce 100644 (file)
 
 #include <exception>
 
+
+namespace lyx {
+
 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();
 }
 
 }
@@ -53,8 +57,11 @@ void assertion_failed(char const * expr, char const * function,
               << " by failing check \"" << expr << "\""
               << " in file " << file << ":" << line << endl;
        emergencyCleanup();
-       lyx::support::abort();
+       support::abort();
 }
 
 
 }
+
+
+} // namespace lyx