ProgramValidationError¶
from cascaqit import ProgramValidationError
An exception for invalid programs, parameters or payloads. It is catchable as both ValueError and CASCAQitError.
Defaults are category=validation, code=PROGRAM_VALIDATION_ERROR, stage=validation, severity=error and retryable=False. Callers can override code, stage, object_path, suggestion and other fields. See CASCAQitError for the full constructor contract.
Usually correct the declaration identified by object_path before rerunning. Resubmitting the same invalid program does not remove a validation error.
from cascaqit import ProgramValidationError
error = ProgramValidationError("Example failure", object_path="program")
assert error.to_error_ir().category == "validation"
assert error.to_diagnostic().code == "PROGRAM_VALIDATION_ERROR"
See Results and diagnostics for troubleshooting.
Return ErrorIR containing this exception’s category, code and context. Preserve the configured retryable value without initiating a retry.
Return DiagnosticsIR for display in a diagnostic list. Full provenance, cause and attached diagnostics remain in the exception and its ErrorIR.