[ Reference Manual | Alphabetic Index ]

# library(error)

Utilities for argument type testing and error generation [more]

## Predicates

> domain_error(?Domain, ?Culprit)
>   throw error(domain_error(Domain,Culprit), _)
> evaluation_error(?Reason)
>   throw error(evaluation_error(Reason), _)
> existence_error(?ObjectType, ?Culprit)
>   throw error(existence_error(ObjectType,Culprit), _)
> instantiation_error(?Culprit)
>   throw error(instantiation_error, _)
> must_be(+Type, ?Term)
>   Test a term for an expected type and throw an error if it does not match
> permission_error(?Operation, ?Permission, ?Culprit)
>   throw error(permission_error(Operation,Permission,Culprit), _)
> representation_error(?Reason)
>   throw error(representation_error(Reason), _)
> resource_error(?Resource)
>   throw error(resource_error(Resource), _)
> type_error(?Type, ?Culprit)
>   throw error(type_error(Type,Culprit), _)
> uninstantiation_error(?Culprit)
>   throw error(uninstantiation_error(Culprit), _)

## Description

This library is modelled after SWI-Prolog's library(error) and provides facilities to simplify the raising of ISO-Prolog conforming exceptions, and testing argument types and domains.

## About

- Author: Joachim Schimpf
- Copyright © Coninfer Ltd
- Date: $Date: 2017/09/03 00:50:40 $

Generated from error.eci on 2022-09-03 14:26