Skip to content

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_messageOptional

  • Type: str

resultsOptional


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.

messageRequired

  • Type: str

Properties

Name Type Description
error_message str No description.
is_success bool No description.
results ValidationResults No description.

error_messageRequired

error_message: str
  • Type: str

is_successRequired

is_success: bool
  • Type: bool

resultsRequired

results: ValidationResults