Next: , Previous: , Up: mpg-ref   [Contents][Index]


11.1.5 Exceptions

The Exceptions field of the reference page consists of a list of exception type names, each followed by a brief description of the situation that causes that type of exception to be raised. The following example comes from the reference page for assert/[1,2]:

Exceptions

instantiation_error

If Head (in Clause) or M is uninstantiated.

type_error

If Head is not of type callable, or if M is not an atom, or if Body is not a valid clause body.

For input arguments, an exception will be raised if the argument is not of the specified type.

For output arguments, an exception might be raised if the argument is nonvar, and not of the specified type. The generated value of the argument will be of the specified type.


Send feedback on this subject.