in reply to Re7: Error module
in thread Error module
Then I'v created /usr/local/bin/test.pl with the following contents:package MyErrors::SomeError; use Error::Simple; @ISA = qw(Error::Simple); 1;
When I run test.pl I get the following error:#!/usr/bin/perl -w use Error qw(:try); use MyErrors::SomeError; try { throw MyErrors::SomeError('throwing SomeError exception'); } catch MyErrors::SomeError with { my $err = shift; print "caught it: $err->{'-text'}\n"; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re9: Error module
by dragonchild (Archbishop) on Aug 19, 2003 at 15:43 UTC | |
by hotshot (Prior) on Aug 19, 2003 at 15:57 UTC | |
by dragonchild (Archbishop) on Aug 19, 2003 at 16:15 UTC |