Jump to content

Exceptions: Difference between revisions

No edit summary
Line 981:
'''Throw exceptions'''
<lang elena>foo
[
[
MyException new; raise.
]
]
</lang>
 
'''Catching exceptions'''
<lang csharpelena>try(o foo)
{
{
on(MyException e)
[
// handle exceptions of type MyException and derived
]
}</lang>
 
'''Catching any exception'''
<lang csharpelena>o foo | if(:e)
[
// handle any type of exception not handled by above catches
].</lang>
 
=={{header|Erlang}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.