Show
Ignore:
Timestamp:
12/09/08 13:57:55 (4 years ago)
Author:
tokuhirom
Message:

return response value.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/CGI-ExceptionManager/trunk/lib/CGI/ExceptionManager.pm

    r24781 r26178  
    55our $VERSION = '0.03'; 
    66 
    7 sub detach { die bless [], 'CGI::ExceptionManager::Exception' } 
     7sub detach { die bless [@_], 'CGI::ExceptionManager::Exception' } 
    88 
    99my $stacktrace_required; 
     
    1212    my ($class, %args) = @_; 
    1313 
     14    my $response; 
    1415    my $err_info; 
    1516    local $SIG{__DIE__} = sub { 
    1617        my ($msg) = @_; 
    1718        if (ref $msg eq 'CGI::ExceptionManager::Exception') { 
     19            $response = $msg->[0]; 
    1820            undef $err_info; 
    1921        } else { 
     
    2830    local $@; 
    2931    eval { 
    30         $args{callback}->(); 
     32        $response = $args{callback}->(); 
    3133        undef $err_info; 
    3234    }; 
     
    3739        ); 
    3840    } 
     41    return $response; 
    3942} 
    4043