Skip to content

catchSets

Handles errors raised inside the preceding trySets block.

Use catchSets immediately after a trySets block. The parenthesised binding (e.g. (e)) receives the thrown value so your code can inspect or report it. If no error occurs in the trySets block, the catchSets block is skipped. This is a placeholder Setswana name — the canonical Setswana translation will be chosen later.

trySets { ... } catchSets (lebitso) { ... }
Log a caught error to the console
trySets {
  throwSets "phoso";
} catchSets (e) {
  kwala(e);
}

trySets, finallySets, throwSets