Skip to content
ExamplesOpen editor ↗

latlha

→ throw

Raises an error value to be handled by a surrounding `tshwara`.

latlha boleng;

Use latlha to raise an error from inside a leka block. The thrown value (a string, number, or object) is passed to the matching tshwara binding.

Throw a string and catch it
leka {
  latlha "phoso";
} tshwara (e) {
  kwala(e);
}

leka, tshwara, kgabagare