|
A class that allows client application to instantiate a diagnostic delegate that can be used to abort operations for a non fatal USD error or warning based on immutable include exclude rules defined for this instance. More...
#include <conditionalAbortDiagnosticDelegate.h>
Public Member Functions | |
USDUTILS_API | UsdUtilsConditionalAbortDiagnosticDelegate (const UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters &includeFilters, const UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters &excludeFilters) |
Constructor to initialize conditionalAbortDiagnosticDelegate. | |
virtual USDUTILS_API | ~UsdUtilsConditionalAbortDiagnosticDelegate () |
Handles the removal of this delegate from TfDiagnosticMgr. | |
UsdUtilsConditionalAbortDiagnosticDelegate (const UsdUtilsConditionalAbortDiagnosticDelegate &delegate)=delete | |
UsdUtilsConditionalAbortDiagnosticDelegate & | operator= (const UsdUtilsConditionalAbortDiagnosticDelegate &delegate)=delete |
void | IssueError (const TfError &err) override |
Called when a TfError is posted. | |
void | IssueWarning (const TfWarning &warning) override |
Called when a TF_WARNING() is issued. | |
void | IssueFatalError (const TfCallContext &ctx, const std::string &msg) override |
Called when a TF_FATAL_ERROR is issued (or a failed TF_AXIOM ). | |
void | IssueStatus (const TfStatus &status) override |
Called when a TF_STATUS() is issued. | |
virtual void | IssueError (TfError const &err)=0 |
Called when a TfError is posted. | |
virtual void | IssueFatalError (TfCallContext const &context, std::string const &msg)=0 |
Called when a TF_FATAL_ERROR is issued (or a failed TF_AXIOM ). | |
virtual void | IssueStatus (TfStatus const &status)=0 |
Called when a TF_STATUS() is issued. | |
virtual void | IssueWarning (TfWarning const &warning)=0 |
Called when a TF_WARNING() is issued. | |
Protected Member Functions | |
virtual bool | _RuleMatcher (const TfDiagnosticBase &err, const std::vector< TfPatternMatcher > &stringPatternFilters, const std::vector< TfPatternMatcher > &codePathPatternFilters) |
Helper to match err against a given set of errorFilters A client can override this to affect the behavior of the rule matcher. | |
Protected Member Functions inherited from TfDiagnosticMgr::Delegate | |
TF_API void | _UnhandledAbort () const |
Abort the program, but avoid the session logging mechanism. | |
A class that allows client application to instantiate a diagnostic delegate that can be used to abort operations for a non fatal USD error or warning based on immutable include exclude rules defined for this instance.
These rules are regex strings where case sensitive matching is done on error/warning text or the location of the code path where the error/warning occured. Note that these rules will be respected only during the lifetime of the delegate. Include Rules determine what errors or warnings will cause a fatal abort. Exclude Rules determine what errors or warnings matched from the Include Rules should not cause the fatal abort. Example: to abort on all errors and warnings coming from "*pxr*" codepath but not from "*ConditionalAbortDiagnosticDelegate*", a client can create the following delegate:
Definition at line 79 of file conditionalAbortDiagnosticDelegate.h.
USDUTILS_API UsdUtilsConditionalAbortDiagnosticDelegate | ( | const UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters & | includeFilters, |
const UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters & | excludeFilters | ||
) |
Constructor to initialize conditionalAbortDiagnosticDelegate.
Responsible for adding this delegate instance to TfDiagnosticMgr and also sets the includeFilters
and excludeFilters
|
virtual |
Handles the removal of this delegate from TfDiagnosticMgr.
|
protectedvirtual |
Helper to match err
against a given set of errorFilters
A client can override this to affect the behavior of the rule matcher.
|
overridevirtual |
Called when a TfError
is posted.
Implements TfDiagnosticMgr::Delegate.
|
overridevirtual |
Called when a TF_FATAL_ERROR
is issued (or a failed TF_AXIOM
).
Implements TfDiagnosticMgr::Delegate.
|
overridevirtual |
Called when a TF_STATUS()
is issued.
Implements TfDiagnosticMgr::Delegate.
|
overridevirtual |
Called when a TF_WARNING()
is issued.
Implements TfDiagnosticMgr::Delegate.