mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
Remove unhandled exception catcher
This commit is contained in:
@@ -52,8 +52,6 @@ David Features:
|
||||
down the cache and then something that uses the cache, objects may get
|
||||
put in the cache after it was shut down.
|
||||
|
||||
- Figure out the right behavior of ProtectedCall
|
||||
|
||||
- Do something about the throw() reporting weaknesses:
|
||||
* Make sure all Sconstruct and .pro builds have debug symbols in release
|
||||
* Replace all throw with beast::Throw()
|
||||
|
||||
@@ -75,16 +75,6 @@
|
||||
//#define BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES 1
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
This will wrap thread entry points with an exception catching block.
|
||||
A customizable hook is provided to get called when unhandled exceptions
|
||||
are thrown.
|
||||
@see ProtectedCall
|
||||
*/
|
||||
#ifndef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
#define BEAST_CATCH_UNHANDLED_EXCEPTIONS 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Libraries
|
||||
|
||||
@@ -235,7 +235,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\DynamicList.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\Variant.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\FatalError.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\ProtectedCall.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\FPUFlags.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\LeakChecked.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\SemanticVersion.h" />
|
||||
@@ -730,12 +729,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\diagnostic\ProtectedCall.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\diagnostic\FPUFlags.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
||||
@@ -998,9 +998,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\misc\Main.h">
|
||||
<Filter>beast_core\misc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\ProtectedCall.h">
|
||||
<Filter>beast_core\diagnostic</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\FatalError.h">
|
||||
<Filter>beast_core\diagnostic</Filter>
|
||||
</ClInclude>
|
||||
@@ -1730,9 +1727,6 @@
|
||||
<ClCompile Include="..\..\modules\beast_core\misc\Main.cpp">
|
||||
<Filter>beast_core\misc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\diagnostic\ProtectedCall.cpp">
|
||||
<Filter>beast_core\diagnostic</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\diagnostic\FatalError.cpp">
|
||||
<Filter>beast_core\diagnostic</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
#define BEAST_CATCH_UNHANDLED_EXCEPTIONS 0
|
||||
#endif
|
||||
|
||||
#if BEAST_DEBUG && ! defined (BEAST_CHECK_MEMORY_LEAKS)
|
||||
#define BEAST_CHECK_MEMORY_LEAKS 1
|
||||
#endif
|
||||
|
||||
@@ -329,15 +329,6 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
static int beastCatchExceptions ()
|
||||
{
|
||||
#ifdef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
return BEAST_CATCH_UNHANDLED_EXCEPTIONS;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void runTest ()
|
||||
{
|
||||
beginTestCase ("diagnostics");
|
||||
@@ -346,7 +337,6 @@ public:
|
||||
logMessage ("_DEBUG = " + String::fromNumber (envDebug ()));
|
||||
logMessage ("BEAST_DEBUG = " + String::fromNumber (beastDebug ()));
|
||||
logMessage ("BEAST_FORCE_DEBUG = " + String::fromNumber (beastForceDebug ()));
|
||||
logMessage ("BEAST_CATCH_UNHANDLED_EXCEPTIONS = " + String::fromNumber (beastCatchExceptions ()));
|
||||
logMessage ("sizeof(std::size_t) = " + String::fromNumber (sizeof(std::size_t)));
|
||||
bassertfalse;
|
||||
|
||||
|
||||
@@ -74,16 +74,6 @@
|
||||
//#define BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES 1
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
This will wrap thread entry points with an exception catching block.
|
||||
A customizable hook is provided to get called when unhandled exceptions
|
||||
are thrown.
|
||||
@see ProtectedCall
|
||||
*/
|
||||
#ifndef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
//#define BEAST_CATCH_UNHANDLED_EXCEPTIONS 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Libraries
|
||||
|
||||
@@ -141,7 +141,6 @@ namespace beast
|
||||
#include "diagnostic/FatalError.cpp"
|
||||
#include "diagnostic/FPUFlags.cpp"
|
||||
#include "diagnostic/LeakChecked.cpp"
|
||||
#include "diagnostic/ProtectedCall.cpp"
|
||||
#include "diagnostic/SemanticVersion.cpp"
|
||||
#include "diagnostic/UnitTest.cpp"
|
||||
#include "diagnostic/UnitTestUtilities.cpp"
|
||||
|
||||
@@ -163,7 +163,6 @@ class FileOutputStream;
|
||||
#include "memory/SharedObject.h"
|
||||
#include "memory/SharedPtr.h"
|
||||
#include "memory/SharedFunction.h"
|
||||
#include "diagnostic/ProtectedCall.h"
|
||||
#include "containers/AbstractFifo.h"
|
||||
#include "text/Identifier.h"
|
||||
#include "containers/Variant.h"
|
||||
|
||||
@@ -99,7 +99,7 @@ void Thread::threadEntryPoint()
|
||||
// used to wrap the incoming call from the platform-specific code
|
||||
void BEAST_API beast_threadEntryPoint (void* userData)
|
||||
{
|
||||
ProtectedCall (&Thread::threadEntryPoint, static_cast <Thread*> (userData));
|
||||
static_cast <Thread*> (userData)->threadEntryPoint();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
||||
@@ -17,29 +17,16 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
namespace po = boost::program_options;
|
||||
|
||||
RippleMain::RippleMain()
|
||||
{
|
||||
ProtectedCall::setHandler (*this);
|
||||
}
|
||||
|
||||
RippleMain::~RippleMain()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RippleMain::onException (ProtectedCall::Exception const& e) const
|
||||
{
|
||||
#if BEAST_MSVC
|
||||
ExitProcess(0);
|
||||
#else
|
||||
_Exit(EXIT_FAILURE);
|
||||
#endif
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace po = boost::program_options;
|
||||
|
||||
void setupServer ()
|
||||
{
|
||||
#ifdef RLIMIT_NOFILE
|
||||
|
||||
@@ -21,13 +21,12 @@
|
||||
#ifndef RIPPLE_RIPPLEMAIN_H_INCLUDED
|
||||
#define RIPPLE_RIPPLEMAIN_H_INCLUDED
|
||||
|
||||
class RippleMain : public Main, public ProtectedCall::Handler
|
||||
class RippleMain : public Main
|
||||
{
|
||||
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