September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
5
Task/Exceptions/Elena/exceptions-1.elena
Normal file
5
Task/Exceptions/Elena/exceptions-1.elena
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class MyException :: Exception
|
||||
{
|
||||
constructor new
|
||||
<= new literal:"MyException raised".
|
||||
}
|
||||
4
Task/Exceptions/Elena/exceptions-2.elena
Normal file
4
Task/Exceptions/Elena/exceptions-2.elena
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
foo
|
||||
[
|
||||
MyException new; raise.
|
||||
]
|
||||
7
Task/Exceptions/Elena/exceptions-3.elena
Normal file
7
Task/Exceptions/Elena/exceptions-3.elena
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
try(o foo)
|
||||
{
|
||||
on(MyException e)
|
||||
[
|
||||
// handle exceptions of type MyException and derived
|
||||
]
|
||||
}
|
||||
4
Task/Exceptions/Elena/exceptions-4.elena
Normal file
4
Task/Exceptions/Elena/exceptions-4.elena
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
o foo | if(:e)
|
||||
[
|
||||
// handle any type of exception not handled by above catches
|
||||
].
|
||||
Loading…
Add table
Add a link
Reference in a new issue