#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;
- if (didCleanup)
- return;
-
- didCleanup = true;
+ static bool didCleanup;
+ if (didCleanup)
+ return;
- LyX::emergencyCleanup();
-}
+ didCleanup = true;
+ LyX::cref().emergencyCleanup();
}
lyx::support::abort();
}
-
-}
+} // namespace boost