OpenVDB  8.0.1
ax/openvdb_ax/Exceptions.h
Go to the documentation of this file.
1 // Copyright Contributors to the OpenVDB Project
2 // SPDX-License-Identifier: MPL-2.0
3 
10 
11 #ifndef OPENVDB_AX_EXCEPTIONS_HAS_BEEN_INCLUDED
12 #define OPENVDB_AX_EXCEPTIONS_HAS_BEEN_INCLUDED
13 
14 #include <openvdb/version.h>
15 #include <openvdb/Exceptions.h>
16 
17 #include <sstream>
18 #include <string>
19 
20 namespace openvdb {
22 namespace OPENVDB_VERSION_NAME {
23 
24 #define OPENVDB_AX_EXCEPTION(_classname) \
25 class OPENVDB_API _classname: public Exception \
26 { \
27 public: \
28  _classname() noexcept: Exception( #_classname ) {} \
29  explicit _classname(const std::string& msg) noexcept: Exception( #_classname , &msg) {} \
30 }
31 
32 // @note: Compilation errors due to invalid AX code should be collected using a separate logging system.
33 // These errors are only thrown upon encountering fatal errors within the compiler/executables themselves
39 
40 #undef OPENVDB_AX_EXCEPTION
41 
42 } // namespace OPENVDB_VERSION_NAME
43 } // namespace openvdb
44 
45 #endif // OPENVDB_AX_EXCEPTIONS_HAS_BEEN_INCLUDED
46 
Definition: ax/openvdb_ax/Exceptions.h:34
Definition: ax/openvdb_ax/Exceptions.h:36
Definition: ax/openvdb_ax/Exceptions.h:35
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:101
Definition: openvdb/Exceptions.h:13
Definition: ax/openvdb_ax/Exceptions.h:37
#define OPENVDB_AX_EXCEPTION(_classname)
Definition: ax/openvdb_ax/Exceptions.h:24
Library and file format version numbers.
Definition: ax/openvdb_ax/Exceptions.h:38
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:153