Logtalk reference manual
Built-in method: catch/3
Contents > Reference Manual > Built-in Methods > catch/3

## catch/3

#### Description

    catch(Goal, Catcher, Recovery)

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

#### Template and modes

    catch(?callable, ?term, ?term)

#### 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`