Data update

This commit is contained in:
Ingy döt Net 2024-07-13 15:19:22 -07:00
parent 29a5eea0d4
commit 5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions

View file

@ -1,7 +1,7 @@
throw "not a math exception"
catch[.e] {
if .e'cat == "math" {
catch[e] {
if e'cat == "math" {
# change result...
} else {
# rethrow the exception

View file

@ -1,3 +1,3 @@
val .safediv = fn(.x, .y) { .x / .y ; catch : 0 }
.safediv(7, 7) # 1
.safediv(7, 0) # 0
val safediv = fn(x, y) { x / y ; catch : 0 }
safediv(7, 7) # 1
safediv(7, 0) # 0

View file

@ -0,0 +1 @@
type MyException = class(Exception) end;

View file

@ -0,0 +1 @@
raise new MyException;

View file

@ -0,0 +1,6 @@
try
...
except
on e: MyException do
statement
end;