X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;h=13286cc5f706f0501be05f6f84c09c7fc33df648;hb=9e2fbafcfdab1ee45e581524311f1a97ac41f6ad;hp=b7f8e8f4fc9e78a15f43b928c6aad5b900081c27;hpb=6ab5f0300e614249c24916600817ae221a6bdc8c;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index b7f8e8f4..13286cc5 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -242,7 +242,11 @@ sub run_cmd $Cache{$package}->{sub} = $c; } $c = $Cache{$package}->{sub}; - @ans = &{$c}($self, $args); + eval { + @ans = &{$c}($self, $args); + }; + + return ($@) if $@; } } else { dbg('command', "cmd: $cmd not found");