A simple die prints $@ of last failed eval, even without explicitly telling it to do so. And that's confusing if you decided to move on from the failed eval and then you throw a die and it talks about past things... Perhaps something else in the code or Test::More does similar?
use strict; use warnings; use DateTime; my $x = eval{ DateTime->from_epoch(epoch=>'xxxx'); }; print "xx\n"; die; # moving on to other business: my $z = 1; #eval { 1 }; # "reset" $@ die; # still displays the $@ of last failed eval which is irrelevant a +t this point in the code!
In reply to Re: Catching error in DateTime::Format
by bliako
in thread Catching error in DateTime::Format
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |