9 #ifndef __HOM_Errors_h__
10 #define __HOM_Errors_h__
26 : myExitCode(exit_code)
30 {
return myExitCode; }
50 : myInstanceMessage(instance_message ? instance_message :
"")
72 std::string
result =
"<hou.";
73 result += exceptionTypeName();
81 if (description().
size())
83 result += description();
86 std::string instance_msg = instanceMessage();
87 if (instance_msg.size())
89 if (description().size())
91 result += instance_msg;
97 std::string myInstanceMessage;
103 #define SIMPLE_EXCEPTION(exception_name, description_value) \
104 SWIGOUT(%rename(exception_name) HOM_ ## exception_name;) \
105 class HOM_API HOM_ ## exception_name : public HOM_Error \
108 HOM_ ## exception_name(const char* instance_message = "") \
109 : HOM_Error(instance_message) \
111 HOM_Error* clone() override { return new HOM_ ## exception_name(*this); } \
112 std::string exceptionTypeName() override { return #exception_name; } \
113 std::string description() override { return description_value; } \
114 SWIGOUT(std::string __repr__();) \
115 SWIGOUT(std::string __str__();) \
118 #define INTERNAL_EXCEPTION(exception_name, description_value) \
119 SWIGOUT(%ignore HOM_ ## exception_name;) \
120 class HOM_API HOM_ ## exception_name : public HOM_Error \
123 HOM_ ## exception_name(const char* instance_message = "") \
124 : HOM_Error(instance_message) \
126 HOM_Error* clone() override { return new HOM_ ## exception_name(*this); } \
127 std::string exceptionTypeName() override { return #exception_name; } \
128 std::string description() override { return description_value; } \
138 #define DERIVED_EXCEPTION(exception_name, base_exception, description_value) \
139 SWIGOUT(%rename(exception_name) HOM_ ## exception_name;) \
140 class HOM_API HOM_ ## exception_name : public HOM_ ## base_exception \
143 HOM_ ## exception_name(const char* instance_message = "") \
144 : HOM_ ## base_exception(instance_message) \
146 HOM_Error* clone() override { return new HOM_ ## exception_name(*this); } \
147 std::string exceptionTypeName() override { return #exception_name; } \
148 std::string description() override { return description_value; } \
149 SWIGOUT(std::string __repr__();) \
150 SWIGOUT(std::string __str__();) \
153 #define SIMPLE_EXCEPTION_DFLT_INSTANCE(exception_name, description_value, \
154 default_instance_value) \
155 SWIGOUT(%rename(exception_name) HOM_ ## exception_name;) \
156 class HOM_API HOM_ ## exception_name : public HOM_Error \
159 HOM_ ## exception_name(const char* instance_message = "") \
160 : HOM_Error(instance_message) \
162 HOM_Error* clone() override { return new HOM_ ## exception_name(*this); } \
163 std::string exceptionTypeName() override { return #exception_name; } \
164 std::string description() override { return description_value; } \
165 std::string instanceMessage() override \
167 std::string instance_msg = HOM_Error::instanceMessage(); \
168 if (!instance_msg.size()) instance_msg = default_instance_value; \
169 return instance_msg; \
171 SWIGOUT(std::string __repr__();) \
172 SWIGOUT(std::string __str__();) \
176 "Not available in this context")
190 "The attempted operation failed")
192 "The node
type is invalid")
194 "
Node initialization script failed")
196 "Failed to match node
type definition")
198 "Failed to modify node or parameter because of
a permission "
200 "product permissions or user specified permissions")
206 "The requested operation was interrupted")
208 "Warnings were generated during load")
210 "
Error generated by Python node")
212 "Warning generated by Python node")
214 "
Name conflict was detected")
216 "
Type conflict was detected")
218 "Attempt to unregister
a non-registered
state")
220 "Attempt to unregister
a non-registered handle")
224 "The
underlying geometry is not valid. Possibly caused "
225 "by the
source SOP
Node failing to cook since the python "
226 "geometry was assigned.")
virtual std::string exceptionTypeName()
#define INTERNAL_EXCEPTION(exception_name, description_value)
#define SIMPLE_EXCEPTION(exception_name, description_value)
Attempt to access an object that no longer exists in Houdini Invalid output Invalid type The attempted operation failed Node initialization script failed Failed to modify node or parameter because of a permission error Possible causes include locked assets
GLsizei const GLfloat * value
HOM_Error(const char *instance_message="")
virtual HOM_Error * clone()
GLboolean GLboolean GLboolean GLboolean a
**But if you need a result
#define DERIVED_EXCEPTION(exception_name, base_exception, description_value)
constexpr auto in(type t, int set) -> bool
GLint GLint GLsizei GLint GLenum GLenum type
void ignore(T const &) VULKAN_HPP_NOEXCEPT
GLuint GLint GLboolean GLint GLenum access
constexpr auto set(type rhs) -> int
GLsizei GLsizei GLchar * source
virtual std::string instanceMessage()
OIIO_UTIL_API bool exists(string_view path) noexcept
Attempt to access an object that no longer exists in Houdini Invalid output Invalid type The attempted operation failed Node initialization script failed Failed to modify node or parameter because of a permission error Possible causes include locked takes
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
LeafData & operator=(const LeafData &)=delete
#define SIMPLE_EXCEPTION_DFLT_INSTANCE(exception_name, description_value, default_instance_value)
HOM_SystemExit(int exit_code)
virtual std::string description()