mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Call std::exit for unhandled exceptions
This commit is contained in:
@@ -81,8 +81,8 @@
|
||||
are thrown.
|
||||
@see ProtectedCall
|
||||
*/
|
||||
#ifndef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
//#define BEAST_CATCH_UNHANDLED_EXCEPTIONS 1
|
||||
#ifndef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
#define BEAST_CATCH_UNHANDLED_EXCEPTIONS 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -17,6 +17,22 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
RippleMain::RippleMain()
|
||||
{
|
||||
ProtectedCall::setHandler (*this);
|
||||
}
|
||||
|
||||
RippleMain::~RippleMain()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RippleMain::onException (ProtectedCall::Exception const& e) const
|
||||
{
|
||||
std::_Exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace po = boost::program_options;
|
||||
|
||||
|
||||
@@ -21,9 +21,13 @@
|
||||
#ifndef RIPPLE_RIPPLEMAIN_H_INCLUDED
|
||||
#define RIPPLE_RIPPLEMAIN_H_INCLUDED
|
||||
|
||||
class RippleMain : public Main
|
||||
class RippleMain : public Main, public ProtectedCall::Handler
|
||||
{
|
||||
public:
|
||||
RippleMain ();
|
||||
~RippleMain ();
|
||||
|
||||
void onException (ProtectedCall::Exception const& e) const;
|
||||
int run (int argc, char const* const* argv);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user