diff --git a/Subtrees/beast/modules/beast_core/diagnostic/beast_ProtectedCall.cpp b/Subtrees/beast/modules/beast_core/diagnostic/beast_ProtectedCall.cpp index ff709eddcc..e14c5bce14 100644 --- a/Subtrees/beast/modules/beast_core/diagnostic/beast_ProtectedCall.cpp +++ b/Subtrees/beast/modules/beast_core/diagnostic/beast_ProtectedCall.cpp @@ -289,7 +289,7 @@ void ProtectedCall::setHandler (Handler const& handler) s_handler->set (&handler); } -void ProtectedCall::call (Call& call) +void ProtectedCall::call (Call& c) { static DefaultHandler const defaultHandler; @@ -300,7 +300,7 @@ void ProtectedCall::call (Call& call) try { - call (); + c (); } catch (...) { @@ -309,3 +309,26 @@ void ProtectedCall::call (Call& call) handler->onException (e); } } + +//------------------------------------------------------------------------------ + +class ProtectedCallTests : public UnitTest +{ +public: + ProtectedCallTests () : UnitTest ("ProtectedCall", "beast", runManual) + { + } + + void runTest () + { + beginTestCase ("backtrace"); + + pass (); + + String const s = SystemStats::getStackBacktrace (); + + Logger::outputDebugString (s); + } +}; + +static ProtectedCallTests protectedCallTests; diff --git a/Subtrees/beast/modules/beast_core/diagnostic/beast_ProtectedCall.h b/Subtrees/beast/modules/beast_core/diagnostic/beast_ProtectedCall.h index d133d3aa81..d86f5354ef 100644 --- a/Subtrees/beast/modules/beast_core/diagnostic/beast_ProtectedCall.h +++ b/Subtrees/beast/modules/beast_core/diagnostic/beast_ProtectedCall.h @@ -17,7 +17,7 @@ */ //============================================================================== -#ifndef BEAST_P_H_INCLUDED +#ifndef BEAST_PROTECTEDCALL_H_INCLUDED #define BEAST_PROTECTEDCALL_H_INCLUDED /** Call a function in a protected exception context.