UsdUtilsConditionalAbortDiagnosticDelegate Class Reference

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...

+ Inheritance diagram for UsdUtilsConditionalAbortDiagnosticDelegate:

Public Member Functions

USDUTILS_API UsdUtilsConditionalAbortDiagnosticDelegate (const UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters &includeFilters, const UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters &excludeFilters)
 Constructor to initialize conditionalAbortDiagnosticDelegate. More...
 
virtual USDUTILS_API ~UsdUtilsConditionalAbortDiagnosticDelegate ()
 Handles the removal of this delegate from TfDiagnosticMgr. More...
 
 UsdUtilsConditionalAbortDiagnosticDelegate (const UsdUtilsConditionalAbortDiagnosticDelegate &delegate)=delete
 
UsdUtilsConditionalAbortDiagnosticDelegateoperator= (const UsdUtilsConditionalAbortDiagnosticDelegate &delegate)=delete
 
void IssueError (const TfError &err) override
 Called when a TfError is posted. More...
 
void IssueWarning (const TfWarning &warning) override
 Called when a TF_WARNING() is issued. More...
 
void IssueFatalError (const TfCallContext &ctx, const std::string &msg) override
 Called when a TF_FATAL_ERROR is issued (or a failed TF_AXIOM). More...
 
void IssueStatus (const TfStatus &status) override
 Called when a TF_STATUS() is issued. More...
 

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. More...
 
- Protected Member Functions inherited from TfDiagnosticMgr::Delegate
TF_API void _UnhandledAbort () const
 Abort the program, but avoid the session logging mechanism. More...
 

Detailed Description

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:

includeFilters.SetCodePathFilters({"*pxr*"});
excludeFilters.SetCodePathFilters({"*ConditionalAbortDiagnosticDelegate*"});
excludeFilters);

Definition at line 96 of file conditionalAbortDiagnosticDelegate.h.

Constructor & Destructor Documentation

◆ UsdUtilsConditionalAbortDiagnosticDelegate()

Constructor to initialize conditionalAbortDiagnosticDelegate.

Responsible for adding this delegate instance to TfDiagnosticMgr and also sets the includeFilters and excludeFilters

Note
The _includeFilters and _excludeFilters are immutable

◆ ~UsdUtilsConditionalAbortDiagnosticDelegate()

virtual USDUTILS_API ~UsdUtilsConditionalAbortDiagnosticDelegate ( )
virtual

Handles the removal of this delegate from TfDiagnosticMgr.

Member Function Documentation

◆ _RuleMatcher()

virtual bool _RuleMatcher ( const TfDiagnosticBase err,
const std::vector< TfPatternMatcher > &  stringPatternFilters,
const std::vector< TfPatternMatcher > &  codePathPatternFilters 
)
protectedvirtual

Helper to match err against a given set of errorFilters A client can override this to affect the behavior of the rule matcher.

◆ IssueError()

void IssueError ( const TfError err)
overridevirtual

Called when a TfError is posted.

Implements TfDiagnosticMgr::Delegate.

◆ IssueFatalError()

void IssueFatalError ( const TfCallContext &  context,
const std::string &  msg 
)
overridevirtual

Called when a TF_FATAL_ERROR is issued (or a failed TF_AXIOM).

Implements TfDiagnosticMgr::Delegate.

◆ IssueStatus()

void IssueStatus ( const TfStatus status)
overridevirtual

Called when a TF_STATUS() is issued.

Implements TfDiagnosticMgr::Delegate.

◆ IssueWarning()

void IssueWarning ( const TfWarning warning)
overridevirtual

Called when a TF_WARNING() is issued.

Implements TfDiagnosticMgr::Delegate.


The documentation for this class was generated from the following file: