Next: , Previous: , Up: iklib conditions   [Index]


6.12.12 Procedure signature argument violations

Condition Type: &procedure-signature-argument-violation

Condition object type representing an invalid value handed as argument to a procedure application; it is derived from &procedure-argument-violation.

This condition type has the following fields:

index

One–based index of the offending operand. It is #f when the index is unknown.

failed-expression

Symbolic expression representing the predicate used to validate the operand; set to the void object if the expression is not available. When debugging mode is disabled: some code might avoid putting symbolic expressions in this field.

offending-value

The actual value of the operand. If there are multiple offending values: this field can be set to (void) and an additional condition object of type &irritants can be used.

This condition type is meant to be used to signal a wrong argument given to a procedure performing signature validation; for example define* and case-define* use it to signal a violation of the logic predicate specifications.

Function: make-procedure-signature-argument-violation operand-index failed-expression offending-value

Build and return a new condition object of type &procedure-signature-argument-violation.

Function: procedure-signature-argument-violation? obj

Return #t if obj is a condition object of type &procedure-signature-argument-violation; otherwise return #f.

Function: procedure-signature-argument-violation.one-based-argument-index cnd
Function: procedure-signature-argument-violation.failed-expression cnd
Function: procedure-signature-argument-violation.offending-value cnd

Accessors for the fields of condition objects of type &procedure-signature-argument-violation.

Function: procedure-signature-argument-violation who message operand-index failed-expression offending-value

Raise a compound condition object as non–continuable exception with component types: &who, &message, &irritants, &procedure-signature-argument-violation.