ValidationResult
Representation of validation results.
Models a tree of validation errors so that we have as much information as possible about the failure that occurred.
Initializers
import ros_cdk_core
ros_cdk_core.ValidationResult(
error_message: str = None,
results: ValidationResults = None
)
Name | Type | Description |
---|---|---|
error_message |
str |
No description. |
results |
ValidationResults |
No description. |
error_message
Optional
- Type: str
results
Optional
- Type: ValidationResults
Methods
Name | Description |
---|---|
assert_success |
Turn a failed validation into an exception. |
error_tree |
Return a string rendering of the tree of validation failures. |
prefix |
Wrap this result with an error message, if it concerns an error. |
assert_success
def assert_success() -> None
Turn a failed validation into an exception.
error_tree
def error_tree() -> str
Return a string rendering of the tree of validation failures.
prefix
def prefix(
message: str
) -> ValidationResult
Wrap this result with an error message, if it concerns an error.
- Type: str
Properties
Name | Type | Description |
---|---|---|
error_message |
str |
No description. |
is_success |
bool |
No description. |
results |
ValidationResults |
No description. |
error_message
Required
error_message: str
- Type: str
is_success
Required
is_success: bool
- Type: bool
results
Required
results: ValidationResults
- Type: ValidationResults