31 #ifndef OPENVDB_EXCEPTIONS_HAS_BEEN_INCLUDED 32 #define OPENVDB_EXCEPTIONS_HAS_BEEN_INCLUDED 53 const char*
what() const noexcept
override 55 try {
return mMessage.c_str(); }
catch (...) {}
61 explicit Exception(
const char* eType,
const std::string*
const msg =
nullptr) noexcept
64 if (eType) mMessage = eType;
65 if (msg) mMessage +=
": " + (*msg);
74 #define OPENVDB_EXCEPTION(_classname) \ 75 class OPENVDB_API _classname: public Exception \ 78 _classname() noexcept: Exception( #_classname ) {} \ 79 explicit _classname(const std::string& msg) noexcept: Exception( #_classname , &msg) {} \ 94 #undef OPENVDB_EXCEPTION 102 Exception(
"IllegalValueException", &msg) {}
109 #define OPENVDB_THROW(exception, message) \ 111 std::string _openvdb_throw_msg; \ 113 std::ostringstream _openvdb_throw_os; \ 114 _openvdb_throw_os << message; \ 115 _openvdb_throw_msg = _openvdb_throw_os.str(); \ 117 throw exception(_openvdb_throw_msg); \ 120 #endif // OPENVDB_EXCEPTIONS_HAS_BEEN_INCLUDED
Definition: Exceptions.h:90
Definition: Exceptions.h:86
Definition: Exceptions.h:91
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:136
Exception(const char *eType, const std::string *const msg=nullptr) noexcept
Definition: Exceptions.h:61
Definition: Exceptions.h:87
OPENVDB_DEPRECATED IllegalValueException(const std::string &msg) noexcept
Definition: Exceptions.h:101
Definition: Exceptions.h:40
Definition: Exceptions.h:84
Exception() noexcept
Definition: Exceptions.h:60
Library and file format version numbers.
Definition: Exceptions.h:98
const char * what() const noexcept override
Definition: Exceptions.h:53
Definition: Exceptions.h:92
Definition: Exceptions.h:89
Definition: Exceptions.h:85
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:188
Definition: Exceptions.h:44
#define OPENVDB_EXCEPTION(_classname)
Definition: Exceptions.h:74
Definition: Exceptions.h:88
OPENVDB_DEPRECATED IllegalValueException() noexcept
Definition: Exceptions.h:100
Definition: Exceptions.h:83