From: <ple...@tr...> - 2004-05-26 17:21:41
|
Log Message: ----------- small fix to Krang::Publisher to do a better job of not hiding errors during publish Modified Files: -------------- krang/lib/Krang: Publisher.pm Revision Data ------------- Index: Publisher.pm =================================================================== RCS file: /usr/local/krang-cvs/krang/lib/Krang/Publisher.pm,v retrieving revision 1.83 retrieving revision 1.84 diff -Llib/Krang/Publisher.pm -Llib/Krang/Publisher.pm -u -r1.83 -r1.84 --- lib/Krang/Publisher.pm +++ lib/Krang/Publisher.pm @@ -504,9 +504,9 @@ }; - if ($@) { - if ($skip_callback) { - if (ref $@ && $@->isa('Krang::Publisher::FileWriteError')) { + if (my $err = $@) { + if ($skip_callback && ref $err) { + if ($@->isa('Krang::Publisher::FileWriteError')) { $skip_callback->(object => $object, error => 'output_error', path => $@->destination, @@ -516,8 +516,9 @@ $skip_callback->(object => $object, error => $@->isa); } } - # the skip_callback is not used by the CGIs - re-propegate the error so the UI + # the skip_callback is not used by the CGIs, re-propegate the error so the UI # can handle it. + # Other concern is that the error is not an object. else { die ($@); } |