mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 11:15:56 +00:00
Remove BEAST_CATCH_UNHANDLED_EXCEPTIONS
This commit is contained in:
@@ -54,14 +54,6 @@
|
||||
//#define BEAST_LOG_ASSERTIONS 1
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
This will wrap certain operating system calls with exception catching
|
||||
code that converts the system exception into a regular error.
|
||||
*/
|
||||
#ifndef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
//#define BEAST_CATCH_UNHANDLED_EXCEPTIONS 0
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_CHECK_MEMORY_LEAKS
|
||||
Enables a memory-leak check for certain objects when the app terminates.
|
||||
See the LeakChecked class for more details about enabling leak checking for
|
||||
|
||||
@@ -860,12 +860,8 @@ bool Process::openDocument (const String& fileName, const String& parameters)
|
||||
{
|
||||
HINSTANCE hInstance = 0;
|
||||
|
||||
BEAST_TRY
|
||||
{
|
||||
hInstance = ShellExecute (0, 0, fileName.toWideCharPointer(),
|
||||
parameters.toWideCharPointer(), 0, SW_SHOWDEFAULT);
|
||||
}
|
||||
BEAST_CATCH_ALL
|
||||
hInstance = ShellExecute (0, 0, fileName.toWideCharPointer(),
|
||||
parameters.toWideCharPointer(), 0, SW_SHOWDEFAULT);
|
||||
|
||||
return hInstance > (HINSTANCE) 32;
|
||||
}
|
||||
|
||||
@@ -335,26 +335,18 @@ bool DynamicLibrary::open (const String& name)
|
||||
{
|
||||
close();
|
||||
|
||||
BEAST_TRY
|
||||
{
|
||||
handle = LoadLibrary (name.toWideCharPointer());
|
||||
}
|
||||
BEAST_CATCH_ALL
|
||||
handle = LoadLibrary (name.toWideCharPointer());
|
||||
|
||||
return handle != nullptr;
|
||||
}
|
||||
|
||||
void DynamicLibrary::close()
|
||||
{
|
||||
BEAST_TRY
|
||||
if (handle != nullptr)
|
||||
{
|
||||
if (handle != nullptr)
|
||||
{
|
||||
FreeLibrary ((HMODULE) handle);
|
||||
handle = nullptr;
|
||||
}
|
||||
FreeLibrary ((HMODULE) handle);
|
||||
handle = nullptr;
|
||||
}
|
||||
BEAST_CATCH_ALL
|
||||
}
|
||||
|
||||
void* DynamicLibrary::getFunction (const String& functionName) noexcept
|
||||
|
||||
@@ -172,22 +172,6 @@ template <> struct BeastStaticAssert <true> { static void dummy() {} };
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
# define BEAST_TRY try
|
||||
# define BEAST_CATCH_ALL catch (...) {}
|
||||
# define BEAST_CATCH_ALL_ASSERT catch (...) { bassertfalse; }
|
||||
# define BEAST_CATCH_EXCEPTION BEAST_CATCH_ALL
|
||||
|
||||
#else
|
||||
# define BEAST_TRY
|
||||
# define BEAST_CATCH_EXCEPTION
|
||||
# define BEAST_CATCH_ALL
|
||||
# define BEAST_CATCH_ALL_ASSERT
|
||||
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if BEAST_DEBUG || DOXYGEN
|
||||
/** A platform-independent way of forcing an inline function.
|
||||
Use the syntax: @code
|
||||
|
||||
@@ -79,22 +79,18 @@ void Thread::threadEntryPoint()
|
||||
const CurrentThreadHolder::Ptr currentThreadHolder (getCurrentThreadHolder());
|
||||
currentThreadHolder->value = this;
|
||||
|
||||
BEAST_TRY
|
||||
if (threadName.isNotEmpty())
|
||||
setCurrentThreadName (threadName);
|
||||
|
||||
if (startSuspensionEvent.wait (10000))
|
||||
{
|
||||
if (threadName.isNotEmpty())
|
||||
setCurrentThreadName (threadName);
|
||||
bassert (getCurrentThreadId() == threadId);
|
||||
|
||||
if (startSuspensionEvent.wait (10000))
|
||||
{
|
||||
bassert (getCurrentThreadId() == threadId);
|
||||
if (affinityMask != 0)
|
||||
setCurrentThreadAffinityMask (affinityMask);
|
||||
|
||||
if (affinityMask != 0)
|
||||
setCurrentThreadAffinityMask (affinityMask);
|
||||
|
||||
run();
|
||||
}
|
||||
run();
|
||||
}
|
||||
BEAST_CATCH_ALL_ASSERT
|
||||
|
||||
currentThreadHolder->value.releaseCurrentThreadStorage();
|
||||
closeThreadHandle();
|
||||
|
||||
@@ -332,11 +332,7 @@ bool ThreadPool::runNextJob()
|
||||
|
||||
ThreadPoolJob::JobStatus result = ThreadPoolJob::jobHasFinished;
|
||||
|
||||
BEAST_TRY
|
||||
{
|
||||
result = job->runJob();
|
||||
}
|
||||
BEAST_CATCH_ALL_ASSERT
|
||||
result = job->runJob();
|
||||
|
||||
OwnedArray<ThreadPoolJob> deletionList;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user