hotshot has asked for the wisdom of the Perl Monks concerning the following question:
Several things:#!/usr/bin/perl -w # filename: test.pl Use Error qe(:try); try { &func1(); print "still in try block\n"; } catch Error::Simple with { my $err = shift; print "Error: ", $err->{'-text'}, "\n"; print "had some problem\n"; } otherwise { print "in otherwise block\n"; } sub func1 { print "in func1\n"; throw Error::Simple('throwing simple error'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Error module
by broquaint (Abbot) on Aug 18, 2003 at 10:15 UTC | |
by hotshot (Prior) on Aug 18, 2003 at 11:15 UTC | |
by broquaint (Abbot) on Aug 18, 2003 at 11:45 UTC | |
by hotshot (Prior) on Aug 18, 2003 at 16:22 UTC | |
by dragonchild (Archbishop) on Aug 18, 2003 at 17:07 UTC | |
| |
|
Re: Error module
by gjb (Vicar) on Aug 18, 2003 at 10:55 UTC | |
by dragonchild (Archbishop) on Aug 18, 2003 at 14:13 UTC | |
|
Re: Error module
by wirrwarr (Monk) on Aug 18, 2003 at 13:17 UTC |