27#include <unordered_map>
33#define CATCH_LIBRARY_EXCEPTIONS_AND_RUN(statement) \
34 catch (const Safir::Dob::Typesystem::FundamentalException & exc) \
35 {Safir::Dob::Typesystem::LibraryExceptions::Instance().Set(exc); statement;} \
36 catch (const Safir::Dob::Typesystem::Exception & exc) \
37 {Safir::Dob::Typesystem::LibraryExceptions::Instance().Set(exc); statement;} \
38 catch (const std::exception & exc) \
39 {Safir::Dob::Typesystem::LibraryExceptions::Instance().Set(exc); statement;} \
41 {Safir::Dob::Typesystem::LibraryExceptions::Instance().SetUnknown(); statement;}
43#define CATCH_LIBRARY_EXCEPTIONS \
44 catch (const Safir::Dob::Typesystem::FundamentalException & exc) \
45 {Safir::Dob::Typesystem::LibraryExceptions::Instance().Set(exc);} \
46 catch (const Safir::Dob::Typesystem::Exception & exc) \
47 {Safir::Dob::Typesystem::LibraryExceptions::Instance().Set(exc);} \
48 catch (const std::exception & exc) \
49 {Safir::Dob::Typesystem::LibraryExceptions::Instance().Set(exc);} \
51 {Safir::Dob::Typesystem::LibraryExceptions::Instance().SetUnknown();}
160 void Set(
const std::exception & exception);
215 typedef void (*ThrowExceptionCallback)(
const std::wstring & description);
240 void Throw(
const TypeId exceptionId,
const std::string& description)
const;
259 struct SingletonHelper
265 static std::once_flag m_onceFlag;
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
DotsC_TypeId TypeId
A unique type identifier.
Definition Defs.h:218
Common functionality for the exception hierarchy of the DOB typesystem.
Definition Exceptions.h:73
This is the base class of all Fundamental Exceptions.
Definition Exceptions.h:200
This is the base class of all (non-Fundamental) Exceptions.
Definition Exceptions.h:233
Contains methods used when passing exceptions across language boundaries.
Definition LibraryExceptions.h:64
void Throw()
Throw the current exception.
void AppendDescription(const std::wstring &moreDescription)
Append some text to the description of the current exception.
void Set(const FundamentalException &exception)
Set the current exception.
static LibraryExceptions & Instance()
Get the instance of the singleton.
void SetUnknown()
Set the current exception.
void Set(const std::exception &exception)
Set the current exception.
void Set(const Exception &exception)
Set the current exception.
void Throw(const TypeId exceptionId, const std::string &description) const
Throw a specific exception.
bool RegisterException(const TypeId exceptionId, ThrowExceptionCallback throwFunction)
Register an exception with the object factory.
#define DOTS_CPP_API
Definition Defs.h:33