Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Exceptions/Sidef/exceptions.sidef
Normal file
11
Task/Exceptions/Sidef/exceptions.sidef
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
try {
|
||||
die "I'm dead!"; # throws an exception of type 'error'
|
||||
}
|
||||
catch { |type, msg|
|
||||
say "type: #{type}"; # type: error
|
||||
say "msg: #{msg}"; # msg: I'm dead! at test.sf line 2.
|
||||
};
|
||||
|
||||
say "I'm alive...";
|
||||
die "Now I'm dead!"; # this line terminates the program
|
||||
say "Or am I?"; # Yes, you are!
|
||||
Loading…
Add table
Add a link
Reference in a new issue