sub test_error{
use Error qw(:try);
use EMAN::Service::CCard;
@Error::Service::ISA = qw(Error);
$ccard = CCard->new( );
try {
throw Error::Service(-text => 'You broke!') if 1;
}
except {
# how do I get this to print?
my $E = shift;
my $general_handler = sub {
print "The is the except stuff \n";
return 1;
};
my %hash= (Error::Service => $general_handler,
);
return \%hash;
}
finally {
print "Here we are in the finally \n";
};
}
In reply to Using except clause in Error.pm by kenpo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |