On this page:
try

10 Exceptions

 (require (planet cce/scheme:7:5/exn))

This module provides tools for dealing with exceptions.

(try expr ...+)
Executes the first expression expr in the sequence, producing its result value(s) if it returns any. If it raises an exception instead, try continues with the next expr. Exceptions raised by intermediate expressions are reported to the current logger at the 'debug level before continuing. Exceptions raised by the final expression are not caught by try.

Examples:

> (try (+ 1 2) (+ 3 4))

3

> (try (+ 'one 'two) (+ 3 4))

7

> (try (+ 'one 'two) (+ 'three 'four))

+: expects type <number> as 1st argument, given: 'three;

other arguments were: 'four