![]() |
|
UsdValidationError is an entity returned by a validation task, which is associated with a UsdValidationValidator. More...
#include <error.h>
Public Member Functions | |
| USDVALIDATION_API | UsdValidationError () |
| A default constructed UsdValidationError signifies no error. | |
| USDVALIDATION_API | UsdValidationError (const TfToken &name, const UsdValidationErrorType &errorType, const UsdValidationErrorSites &errorSites, const std::string &errorMsg) |
Instantiate a ValidationError by providing its name, errorType, errorSites and an errorMsg. | |
| bool | operator== (const UsdValidationError &other) const |
| bool | operator!= (const UsdValidationError &other) const |
| const TfToken & | GetName () const & |
| Returns the name token of the UsdValidationError. | |
| TfToken | GetName () && |
| Returns the name token of the UsdValidationError by-value. | |
| UsdValidationErrorType | GetType () const |
| Returns the UsdValidationErrorType associated with this UsdValidationError. | |
| const UsdValidationErrorSites & | GetSites () const & |
| Returns the UsdValidationErrorSite associated with this UsdValidationError. | |
| UsdValidationErrorSites | GetSites () && |
| Returns the UsdValidationErrorSite associated with this UsdValidationError by-value. | |
| const UsdValidationValidator * | GetValidator () const |
| Returns the UsdValidationValidator that reported this error. | |
| const std::string & | GetMessage () const |
| Returns the message associated with this UsdValidationError. | |
| USDVALIDATION_API TfToken | GetIdentifier () const |
| An identifier for the error constructed from the validator name this error was generated from and its name. | |
| USDVALIDATION_API std::string | GetErrorAsString () const |
| Returns UsdValidationErrorType and ErrorMessage concatenated as a string. | |
| bool | HasNoError () const |
| Returns true if UsdValidationErrorType is UsdValidationErrorType::None, false otherwise. | |
Friends | |
| class | UsdValidationValidator |
UsdValidationError is an entity returned by a validation task, which is associated with a UsdValidationValidator.
A UsdValidationError instance contains important information, like:
UsdValidationError instances will be stored in the UsdValidationContext responsible for executing a set of UsdValidationValidators.
| USDVALIDATION_API UsdValidationError | ( | ) |
A default constructed UsdValidationError signifies no error.
| USDVALIDATION_API UsdValidationError | ( | const TfToken & | name, |
| const UsdValidationErrorType & | errorType, | ||
| const UsdValidationErrorSites & | errorSites, | ||
| const std::string & | errorMsg | ||
| ) |
Instantiate a ValidationError by providing its name, errorType, errorSites and an errorMsg.
| USDVALIDATION_API std::string GetErrorAsString | ( | ) | const |
Returns UsdValidationErrorType and ErrorMessage concatenated as a string.
| USDVALIDATION_API TfToken GetIdentifier | ( | ) | const |
An identifier for the error constructed from the validator name this error was generated from and its name.
Since a validator may result in multiple distinct errors, the identifier helps in distinguishing and categorizing the errors. The identifier returned will be in the following form: For a plugin validator: "plugName":"validatorName"."ErrorName" For a non-plugin validator: "validatorName"."ErrorName"
For an error that was generated without a name, the identifier will be same as the validator name which generated the error.
For an error which is created directly and not via UsdValidationValidator::Validate() call, we throw a coding error, as its an improper use of the API.
|
inline |
Returns the message associated with this UsdValidationError.
|
inline |
Returns the name token of the UsdValidationError by-value.
|
inline |
Returns the name token of the UsdValidationError.
|
inline |
Returns the UsdValidationErrorSite associated with this UsdValidationError by-value.
|
inline |
Returns the UsdValidationErrorSite associated with this UsdValidationError.
|
inline |
Returns the UsdValidationErrorType associated with this UsdValidationError.
|
inline |
Returns the UsdValidationValidator that reported this error.
This will return nullptr if there is no UsdValidationValidator associated with this error. This will never be nullptr for validation errors returned from calls to UsdValidationValidator::Validate.
|
inline |
Returns true if UsdValidationErrorType is UsdValidationErrorType::None, false otherwise.
|
inline |
|
inline |
|
friend |