From:
<a_...@us...> - 2006-09-25 13:40:01
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8012/lib/OpenInteract2 Modified Files: Action.pm Log Message: Made possible to override task error handling Index: Action.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action.pm,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** Action.pm 21 Sep 2005 04:16:12 -0000 1.76 --- Action.pm 25 Sep 2006 13:39:48 -0000 1.77 *************** *** 292,297 **** my $content = eval { $self->$method_ref }; if ( $@ ) { ! $log->warn( "Caught error from task $item_desc: $@" ); ! $content = $@; } else { --- 292,296 ---- my $content = eval { $self->$method_ref }; if ( $@ ) { ! $content = $self->_task_error_content( $@, $item_desc ); } else { *************** *** 317,320 **** --- 316,328 ---- } + sub _task_error_content { + my ($self, $error, $item_desc) = @_; + $log ||= get_logger( LOG_ACTION ); + + $log->warn( "Caught error from task $item_desc: $error" ); + + return $error; + } + sub forward { |