Node:CHR Exceptions, Previous:CHR Operator Declarations, Up:CHR Library



Exceptions

The CHR runtime system reports instantiation and type errors for the predicates:

find_constraint/2
findall_constraints/3
insert_constraint/2
remove_constraint/1
notify_constrained/1

The only other CHR specific runtime error is:

! CHR: registering New, module Module already hosts Old
An attempt to load a second handler New into module Module already hosting handler Old was made.

The following exceptional conditions are detected by the CHR compiler:

! CHR Compiler: syntax rule N: Term
If the N-th Term in the file being loaded violates the CHR syntax (see CHR Syntax).

! CHR Compiler: too many general heads in Name
Unspecific heads in definitions like C \ C <=> true must not be combined with other heads in rule Name.

! CHR Compiler: bad pragma Pragma in Name
The pragma Pragma used in rule Name does not qualify. Currently this only happens if Pragma is unbound.

! CHR Compiler: found head F/A in Name, expected one of: F/A list
Rule Name has a head of given F/A, which is not among the defined constraints.

! CHR Compiler: head identifiers in Name are not unique variables
The identifiers to refer to individual constraints (heads) via # in rule Name do not meet the indicated requirements.

! CHR Compiler: no handler defined
CHR specific language elements, declarations or rules for example, are used before a handler was defined. This error is usually reported a couple of times, i.e. as often as there are CHR forms in the file expecting the missing definition.

! CHR Compiler: compilation failed
Not your fault. Send us a bug report.