HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdUtilsConditionalAbortDiagnosticDelegate Class Reference

#include <conditionalAbortDiagnosticDelegate.h>

+ Inheritance diagram for UsdUtilsConditionalAbortDiagnosticDelegate:

Public Member Functions

USDUTILS_API UsdUtilsConditionalAbortDiagnosticDelegate (const UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters &includeFilters, const UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters &excludeFilters)
 
virtual USDUTILS_API ~UsdUtilsConditionalAbortDiagnosticDelegate ()
 Handles the removal of this delegate from TfDiagnosticMgr. More...
 
 UsdUtilsConditionalAbortDiagnosticDelegate ()=delete
 
 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
 
void IssueStatus (const TfStatus &status) override
 Called when a TF_STATUS() is issued. More...
 
- Public Member Functions inherited from TfDiagnosticMgr::Delegate
virtual TF_API ~Delegate ()=0
 

Protected Member Functions

virtual bool _RuleMatcher (const TfDiagnosticBase &err, const std::vector< TfPatternMatcher > &stringPatternFilters, const std::vector< TfPatternMatcher > &codePathPatternFilters)
 
- Protected Member Functions inherited from TfDiagnosticMgr::Delegate
TF_API void _UnhandledAbort () const
 

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

USDUTILS_API UsdUtilsConditionalAbortDiagnosticDelegate::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

Note
The _includeFilters and _excludeFilters are immutable
virtual USDUTILS_API UsdUtilsConditionalAbortDiagnosticDelegate::~UsdUtilsConditionalAbortDiagnosticDelegate ( )
virtual

Handles the removal of this delegate from TfDiagnosticMgr.

UsdUtilsConditionalAbortDiagnosticDelegate::UsdUtilsConditionalAbortDiagnosticDelegate ( )
delete
UsdUtilsConditionalAbortDiagnosticDelegate::UsdUtilsConditionalAbortDiagnosticDelegate ( const UsdUtilsConditionalAbortDiagnosticDelegate delegate)
delete

Member Function Documentation

virtual bool UsdUtilsConditionalAbortDiagnosticDelegate::_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.

void UsdUtilsConditionalAbortDiagnosticDelegate::IssueError ( const TfError err)
overridevirtual

Called when a TfError is posted.

Implements TfDiagnosticMgr::Delegate.

void UsdUtilsConditionalAbortDiagnosticDelegate::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.

void UsdUtilsConditionalAbortDiagnosticDelegate::IssueStatus ( const TfStatus status)
overridevirtual

Called when a TF_STATUS() is issued.

Implements TfDiagnosticMgr::Delegate.

void UsdUtilsConditionalAbortDiagnosticDelegate::IssueWarning ( const TfWarning warning)
overridevirtual

Called when a TF_WARNING() is issued.

Implements TfDiagnosticMgr::Delegate.

UsdUtilsConditionalAbortDiagnosticDelegate& UsdUtilsConditionalAbortDiagnosticDelegate::operator= ( const UsdUtilsConditionalAbortDiagnosticDelegate delegate)
delete

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