This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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...

#include <conditionalAbortDiagnosticDelegate.h>

+ Inheritance diagram for UsdUtilsConditionalAbortDiagnosticDelegate:

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
 
UsdUtilsConditionalAbortDiagnosticDelegateoperator= (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.
 

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);
A class which represents the inclusion exclusion filters on which errors will be matched stringFilter...
A class that allows client application to instantiate a diagnostic delegate that can be used to abort...

Definition at line 79 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: