42 #ifndef AI_INCLUDED_EXCEPTIONAL_H
43 #define AI_INCLUDED_EXCEPTIONAL_H
46 #pragma GCC system_header
49 #include <assimp/DefaultIOStream.h>
53 using std::runtime_error;
56 #pragma warning(disable : 4275)
63 template<
typename... T,
typename U>
65 DeadlyErrorBase(std::move(f << std::forward<U>(u)), std::forward<T>(args)...) {}
75 template<
typename... T>
83 template<
typename... T>
89 #pragma warning(default : 4275)
95 T operator()()
const {
101 template <
typename T>
103 T *operator()()
const {
114 }
catch (std::bad_alloc &) {
125 void operator()()
const {
130 #define ASSIMP_BEGIN_EXCEPTION_REGION() \
134 #define ASSIMP_END_EXCEPTION_REGION_WITH_ERROR_STRING(type, ASSIMP_END_EXCEPTION_REGION_errorString, ASSIMP_END_EXCEPTION_REGION_exception) \
136 catch (const DeadlyImportError &e) { \
137 ASSIMP_END_EXCEPTION_REGION_errorString = e.what(); \
138 ASSIMP_END_EXCEPTION_REGION_exception = std::current_exception(); \
139 return ExceptionSwallower<type>()(); \
142 ASSIMP_END_EXCEPTION_REGION_errorString = "Unknown exception"; \
143 ASSIMP_END_EXCEPTION_REGION_exception = std::current_exception(); \
144 return ExceptionSwallower<type>()(); \
148 #define ASSIMP_END_EXCEPTION_REGION(type) \
151 return ExceptionSwallower<type>()(); \
155 #endif // AI_INCLUDED_EXCEPTIONAL_H
DeadlyExportError(T &&... args)
Definition: Exceptional.h:84
aiReturn
Definition: types.h:397
Definition: Exceptional.h:80
Definition: Exceptional.h:72
Definition: Exceptional.h:94
@ aiReturn_OUTOFMEMORY
Definition: types.h:407
Definition: Exceptional.h:59
Definition: ai_assert.h:50
DeadlyImportError(T &&... args)
Definition: Exceptional.h:76
@ aiReturn_FAILURE
Definition: types.h:402