Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 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("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.raise()
|
||||
}
|
||||
8
Task/Exceptions/Elena/exceptions-3.elena
Normal file
8
Task/Exceptions/Elena/exceptions-3.elena
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
try
|
||||
{
|
||||
o.foo()
|
||||
}
|
||||
catch:(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() | on:(e)
|
||||
{
|
||||
// handle any type of exception
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue