LibreCat / Catmandu

Catmandu - a data processing toolkit
https://librecat.org
176 stars 31 forks source link

Error handling broken in catmandu 0.9209 #123

Closed phochste closed 9 years ago

phochste commented 9 years ago

Throwing of Catmandu::ParseError is broken in version 0.9209

Test:

package Catmandu::Fix::error;
use Moo;

package main;
use Catmandu;
use Catmandu::Fix;
use Try::Tiny;

try {
  my $fixer = Catmandu::Fix->new(fixes => ['error()']);
  $fixer->fix({});
}
catch  {
   printf "1: throws: %s\n" , ref($_);
};

try {
  my $fixer = Catmandu::Fix->new(fixes => ['brol((((((((']);
  $fixer->fix({});
}
catch  {
   printf "2: throws: %s\n" , ref($_);
};

Should produce:

1: throws: Catmandu::FixError
2: throws: Catmandu::ParseError

But gives

1: throws: Catmandu::FixError
2: throws:
nics commented 9 years ago

I digged into this and it's not related to Catmandu 0.9209. Some other factor is in play, Perl version maybe?

nics commented 9 years ago

output is wrong in perl 5.10.1, correct in perl 5.18 & 5.19

phochste commented 9 years ago

5.10.1 is default for RedHaty installs...

nics commented 9 years ago

ok. just trying to establish the pattern here.

On 18/12/14 17:01, Patrick Hochstenbach wrote:

5.10.1 is default for RedHaty installs...

— Reply to this email directly or view it on GitHub https://github.com/LibreCat/Catmandu/issues/123#issuecomment-67507368.

nics commented 9 years ago

fixed in 999fbe09dee9528e2673f3e77923a661795e687a