9 #ifndef __HOM_Errors_h__
10 #define __HOM_Errors_h__
26 : myExitCode(exit_code)
30 {
return myExitCode; }
50 : myInstanceMessage(instance_message ? instance_message :
"")
67 result += exceptionTypeName();
75 if (description().
size())
77 result += description();
81 if (instance_msg.size())
83 if (description().size())
85 result += instance_msg;
97 #define SIMPLE_EXCEPTION(exception_name, description_value) \
98 SWIGOUT(%rename(exception_name) HOM_ ## exception_name;) \
99 class HOM_API HOM_ ## exception_name : public HOM_Error \
102 HOM_ ## exception_name(const char* instance_message = "") \
103 : HOM_Error(instance_message) \
105 HOM_Error* clone() override { return new HOM_ ## exception_name(*this); } \
106 std::string exceptionTypeName() override { return #exception_name; } \
107 std::string description() override { return description_value; } \
108 SWIGOUT(std::string __repr__();) \
109 SWIGOUT(std::string __str__();) \
112 #define INTERNAL_EXCEPTION(exception_name, description_value) \
113 SWIGOUT(%ignore HOM_ ## exception_name;) \
114 class HOM_API HOM_ ## exception_name : public HOM_Error \
117 HOM_ ## exception_name(const char* instance_message = "") \
118 : HOM_Error(instance_message) \
120 HOM_Error* clone() override { return new HOM_ ## exception_name(*this); } \
121 std::string exceptionTypeName() override { return #exception_name; } \
122 std::string description() override { return description_value; } \
132 #define DERIVED_EXCEPTION(exception_name, base_exception, description_value) \
133 SWIGOUT(%rename(exception_name) HOM_ ## exception_name;) \
134 class HOM_API HOM_ ## exception_name : public HOM_ ## base_exception \
137 HOM_ ## exception_name(const char* instance_message = "") \
138 : HOM_ ## base_exception(instance_message) \
140 HOM_Error* clone() override { return new HOM_ ## exception_name(*this); } \
141 std::string exceptionTypeName() override { return #exception_name; } \
142 std::string description() override { return description_value; } \
143 SWIGOUT(std::string __repr__();) \
144 SWIGOUT(std::string __str__();) \
147 #define SIMPLE_EXCEPTION_DFLT_INSTANCE(exception_name, description_value, \
148 default_instance_value) \
149 SWIGOUT(%rename(exception_name) HOM_ ## exception_name;) \
150 class HOM_API HOM_ ## exception_name : public HOM_Error \
153 HOM_ ## exception_name(const char* instance_message = "") \
154 : HOM_Error(instance_message) \
156 HOM_Error* clone() override { return new HOM_ ## exception_name(*this); } \
157 std::string exceptionTypeName() override { return #exception_name; } \
158 std::string description() override { return description_value; } \
159 std::string instanceMessage() override \
161 std::string instance_msg = HOM_Error::instanceMessage(); \
162 if (!instance_msg.size()) instance_msg = default_instance_value; \
163 return instance_msg; \
165 SWIGOUT(std::string __repr__();) \
166 SWIGOUT(std::string __str__();) \
170 "Not available in this context")
172 "Attempt to
access an
object that no longer
exists in Houdini")
184 "The attempted operation failed")
186 "The node
type is invalid")
188 "
Node initialization script failed")
190 "Failed to match node
type definition")
192 "Failed to modify node or parameter because of
a permission "
194 "product permissions or user specified permissions")
196 "Geometry is read-only")
198 "This keyframe
value is not set")
200 "The requested operation was interrupted")
202 "Warnings were generated during load")
204 "
Error generated by Python node")
206 "Warning generated by Python node")
208 "
Name conflict was detected")
210 "
Type conflict was detected")
212 "Attempt to unregister
a non-registered state")
214 "Attempt to unregister
a non-registered
handle")
218 "The underlying geometry is not valid. Possibly caused "
219 "by the
source SOP
Node failing to cook since the python "
220 "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 GLchar *const * string
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)
void ignore(T const &) VULKAN_HPP_NOEXCEPT
GLuint GLint GLboolean GLint GLenum access
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)
#define SIMPLE_EXCEPTION_DFLT_INSTANCE(exception_name, description_value, default_instance_value)
HOM_SystemExit(int exit_code)
virtual std::string description()