Changeset 773

Show
Ignore:
Timestamp:
03/15/07 20:29:03 (2 years ago)
Author:
hachi
Message:

Allow the hook to die() instead and return a more meaningful error.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/filepaths-20070306/server/lib/MogileFS/Worker/Query.pm

    r761 r773  
    197197 
    198198    # first, pass this to a hook to do any manipulations needed 
    199     { 
    200         my $rv = MogileFS::run_global_hook('cmd_create_open', $args); 
    201         return $self->err_line("plugin_aborted") 
    202             if (defined $rv && ! $rv); # undef = no hooks, 1 = success, 0 = failure 
    203     } 
    204  
     199    eval {MogileFS::run_global_hook('cmd_create_open', $args)}; 
     200 
     201    return $self->err_line("plugin_aborted", "$@") 
     202        if $@; 
    205203 
    206204    # validate parameters