Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
1
Task/Exceptions/PascalABC.NET/exceptions-1.pas
Normal file
1
Task/Exceptions/PascalABC.NET/exceptions-1.pas
Normal file
|
|
@ -0,0 +1 @@
|
|||
type MyException = class(Exception) end;
|
||||
1
Task/Exceptions/PascalABC.NET/exceptions-2.pas
Normal file
1
Task/Exceptions/PascalABC.NET/exceptions-2.pas
Normal file
|
|
@ -0,0 +1 @@
|
|||
raise new MyException;
|
||||
6
Task/Exceptions/PascalABC.NET/exceptions-3.pas
Normal file
6
Task/Exceptions/PascalABC.NET/exceptions-3.pas
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
try
|
||||
...
|
||||
except
|
||||
on e: MyException do
|
||||
statement
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue