7#ifndef PXR_BASE_TF_ERROR_MARK_H
8#define PXR_BASE_TF_ERROR_MARK_H
15#include "pxr/base/tf/api.h"
17PXR_NAMESPACE_OPEN_SCOPE
84 return _mark >= mgr._nextSerial || _IsCleanImpl(mgr);
186#define TF_HAS_ERRORS(marker, expr) \
187 (marker.SetMark(), (expr), !marker.IsClean())
199PXR_NAMESPACE_CLOSE_SCOPE
Singleton class through which all errors and diagnostics pass.
static TF_API This & GetInstance()
Return the singleton instance.
ErrorIterator GetErrorEnd()
Return an iterator to the end of this thread's error list.
TF_API ErrorIterator EraseRange(ErrorIterator first, ErrorIterator last)
Remove all the errors in [first, last) from this thread's error stream.
ErrorList::iterator ErrorIterator
Synonym for standard STL iterator to traverse the error list.
Class used to record the end of the error-list.
Iterator begin() const
Equivalent to GetBegin()
bool Clear() const
Remove all errors in this mark from the error system.
TF_API ~TfErrorMark()
Destroy this ErrorMark.
TF_API TfErrorMark()
Default constructor.
Iterator end() const
Equivalent to GetEnd()
void TransportTo(TfErrorTransport &dest) const
Remove all errors in this mark fom the error system and return them in a TfErrorTransport.
Iterator GetBegin(size_t *nErrors=0) const
Return an iterator to the first error added to the error list after SetMark().
TfErrorTransport Transport() const
Remove all errors in this mark fom the error system and return them in a TfErrorTransport.
Iterator GetEnd() const
Return an iterator past the last error in the error system.
bool IsClean() const
Return true if no new errors were posted in this thread since the last call to SetMark(),...
void SetMark()
Record future errors.
A facility for transporting errors from thread to thread.
void swap(TfErrorTransport &other)
Swap this TfErrorTransport's content with other.
TF_API void TfReportActiveErrorMarks()
Report current TfErrorMark instances and the stack traces that created them to stdout for debugging p...