vbox5: print error messages in 'VirtualBoxBase::handleUnexpectedExceptions()'

Fixes #2879
This commit is contained in:
Christian Prochaska 2018-06-22 17:09:46 +02:00 committed by Norman Feske
parent 0db81f66ae
commit 182d1d339b
1 changed files with 11 additions and 2 deletions

View File

@ -2,6 +2,7 @@
#include "VirtualBoxImpl.h"
#include "VBox/com/MultiResult.h"
#include "iprt/cpp/exception.h"
#include "dummy/macros.h"
@ -30,9 +31,17 @@ HRESULT VirtualBoxBase::setErrorNoLog(HRESULT, const char *, ...)
void VirtualBoxBase::clearError() TRACE()
HRESULT VirtualBoxBase::setError(HRESULT aResultCode) DUMMY(E_FAIL)
HRESULT VirtualBoxBase::setError(const com::ErrorInfo &ei) DUMMY(E_FAIL)
HRESULT VirtualBoxBase::handleUnexpectedExceptions(VirtualBoxBase *const,
RT_SRC_POS_DECL) TRACE(E_FAIL)
HRESULT VirtualBoxBase::setErrorInternal(HRESULT, GUID const&, char const*,
com::Utf8Str, bool, bool) DUMMY(E_FAIL)
HRESULT VirtualBoxBase::initializeComForThread(void) TRACE(S_OK)
void VirtualBoxBase::uninitializeComForThread(void) TRACE()
HRESULT VirtualBoxBase::handleUnexpectedExceptions(VirtualBoxBase *const, RT_SRC_POS_DECL)
{
try { throw; }
catch (const RTCError &err) { Genode::error(err.what()); }
catch (const std::exception &err) { Genode::error(err.what()); }
catch (...) { Genode::error("An unexpected exception occurred"); }
return E_FAIL;
}