RosettaCodeData/Task/Exceptions/Langur/exceptions-1.langur

15 lines
215 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
# do something
throw "not a math exception"
catch .e {
if .e["cat"] == "math" {
# change result...
} else {
# rethrow the exception
throw
}
} else {
# no exception
...
}