SETSWANA TRANSLATION: Skip to content

trySets

SETSWANA TRANSLATION: Begins a block of code whose errors can be caught.

SETSWANA TRANSLATION: Use trySets to wrap code that might fail. If anything inside the block raises an error (via throwSets or otherwise), execution jumps to the matching catchSets block. Pair with finallySets to run cleanup code whether or not an error occurred. This is a placeholder Setswana name — the canonical Setswana translation will be chosen later.

SETSWANA TRANSLATION: trySets { ... } catchSets (e) { ... }
SETSWANA TRANSLATION: Catch an error thrown inside a try block
trySets {
  throwSets "phoso";
} catchSets (e) {
  kwala(e);
}

catchSets, finallySets, throwSets