]> git.lyx.org Git - lyx.git/blobdiff - src/boost.C
* lyx_main.C: remove duplicate function assertion_failed
[lyx.git] / src / boost.C
index 10494e226ad8ed57d0d0c36101edfed264d08906..ff420ec555311da2a44d247c96dd3096e4951ec3 100644 (file)
 #include <exception>
 
 using std::endl;
+using lyx::lyxerr;
+using lyx::LyX;
 
 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;
@@ -43,8 +45,6 @@ void emergencyCleanup()
        LyX::cref().emergencyCleanup();
 }
 
-}
-
 
 void assertion_failed(char const * expr, char const * function,
                      char const * file, long line)
@@ -56,5 +56,4 @@ void assertion_failed(char const * expr, char const * function,
        lyx::support::abort();
 }
 
-
-}
+} // namespace boost