24 #ifndef _GUSD_ERROR_H_
25 #define _GUSD_ERROR_H_
54 #define GUSD_GENERIC_ERR(sev) \
55 if(sev == UT_ERROR_NONE) ; else GusdPostErrorHelper(sev)
57 #define GUSD_ERR() GusdPostErrorHelper(UT_ERROR_ABORT)
59 #define GUSD_WARN() GusdPostErrorHelper(UT_ERROR_WARNING)
61 #define GUSD_MSG() GusdPostErrorHelper(UT_ERROR_MESSAGE)
69 void Msg(
const char* msg)
const;
71 template <
typename T,
typename... Args>
72 void Msg(
const char*
format,
T&& arg1, Args&&...
args)
const;
79 template <
typename T,
typename... Args>
84 buf.
sprintf(format, std::forward<T>(arg1), std::forward<Args>(
args)...);
119 { StealGlobalErrors(); }
123 bool borrowOnly=
false);
126 bool borrowOnly=
false)
143 : _transport(transport) {}
170 : _mgr(mgr), _sev(sev)
179 explicit operator bool()
const {
return _mgr; }
190 bool IsClean()
const {
return _mark.IsClean(); }
206 #endif // _GUSD_ERROR_H_
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei const GLchar *const * string
SYS_FORCE_INLINE const char * buffer() const
UT_API UT_ErrorManager * UTgetErrorManager()
void StealGlobalErrors(UT_ErrorSeverity sev=UT_ERROR_NONE, bool borrowOnly=false)
GusdAutoErrorTransport(GusdErrorTransport &transport)
~GusdAutoErrorTransport()
UT_ErrorSeverity GetLogSeverity() const
GusdPostErrorHelper(UT_ErrorSeverity sev)
GLint GLint GLsizei GLint GLenum format
UT_ErrorSeverity Update()
void Msg(const char *msg) const
int sprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
GUSD_API std::string GusdGetErrors(UT_ErrorManager *mgr=UTgetErrorManager(), UT_ErrorSeverity sev=UT_ERROR_NONE)
GusdErrorTransport(int thread)
#define PXR_NAMESPACE_CLOSE_SCOPE
A global error manager scope.
**If you just want to fire and args
GusdTfErrorScope(UT_ErrorSeverity sev=UT_ERROR_ABORT, UT_ErrorManager *mgr=UTgetErrorManager())
GusdErrorTransport(UT_ErrorManager *mgr=UTgetErrorManager())
UT_API UT_ErrorSeverity UTaddGeneric(UT_ErrorSeverity sev, const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
Add a generic error message to the global error manager.