X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fboost.C;h=ff420ec555311da2a44d247c96dd3096e4951ec3;hb=3815df7705b09920f9bb60c6fd9ee0576fe0a834;hp=440b4ffd931aa6cd99d44b0e8c1d370b5eab121a;hpb=495cd0eea03f9f5471a247e60ce70abfd1114ada;p=lyx.git diff --git a/src/boost.C b/src/boost.C index 440b4ffd93..ff420ec555 100644 --- a/src/boost.C +++ b/src/boost.C @@ -19,30 +19,30 @@ #include 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; - if (didCleanup) - return; - - didCleanup = true; + static bool didCleanup; + if (didCleanup) + return; - LyX::emergencyCleanup(); -} + didCleanup = true; + LyX::cref().emergencyCleanup(); } @@ -56,5 +56,4 @@ void assertion_failed(char const * expr, char const * function, lyx::support::abort(); } - -} +} // namespace boost