5. Only wonder down the msg queue every minute
[spider.git] / perl / DXCommandmode.pm
index b7f8e8f4fc9e78a15f43b928c6aad5b900081c27..13286cc5f706f0501be05f6f84c09c7fc33df648 100644 (file)
@@ -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");