# catch/3

## Description

    catch(Goal, Catcher, Recovery)

Catches exceptions thrown by a goal. See the ISO Prolog standard definition. This built-in meta-predicate is declared as a private method and thus cannot be used as a message to an object.

## Modes and number of proofs

    catch(?callable, ?term, ?term) - zero_or_more

## Errors

Goal is a variable:
`instantiation_error`
Goal is neither a variable nor a callable term:
`type_error(callable, Goal)`

## Examples

(none)

See also

throw/1, context/1, instantiation_error/0, type_error/2, domain_error/2, existence_error/2, permission_error/3, evaluation_error/1, representation_error/1 resource_error/1, syntax_error/1, system_error/0