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