Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Exceptions/Perl/exceptions-1.pl
Normal file
11
Task/Exceptions/Perl/exceptions-1.pl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# throw an exception
|
||||
die "Danger, danger, Will Robinson!";
|
||||
|
||||
# catch an exception and show it
|
||||
eval {
|
||||
die "this could go wrong mightily";
|
||||
};
|
||||
print $@ if $@;
|
||||
|
||||
# rethrow
|
||||
die $@;
|
||||
2
Task/Exceptions/Perl/exceptions-2.pl
Normal file
2
Task/Exceptions/Perl/exceptions-2.pl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# throw an exception
|
||||
die "Danger, danger, Will Robinson!";
|
||||
6
Task/Exceptions/Perl/exceptions-3.pl
Normal file
6
Task/Exceptions/Perl/exceptions-3.pl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# catch an exception and show it
|
||||
try {
|
||||
die "this could go wrong mightily";
|
||||
} catch {
|
||||
print;
|
||||
};
|
||||
2
Task/Exceptions/Perl/exceptions-4.pl
Normal file
2
Task/Exceptions/Perl/exceptions-4.pl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# rethrow (inside of catch)
|
||||
die $_;
|
||||
Loading…
Add table
Add a link
Reference in a new issue