diff --git a/cli.php b/cli.php index c13d5f5..bed43d0 100644 --- a/cli.php +++ b/cli.php @@ -160,9 +160,18 @@ $cli->run(); */ } // TODO : Manage a parameter in the constructor of the class - $r = new $class; - $s = call_user_func_array(array($r, $method), $argv); - var_dump ($s); + try + { + $r = new $class; + $s = call_user_func_array(array($r, $method), $argv); + var_dump ($s); + } + catch (Exception $e) + { + file_put_contents("php://stderr", $e->getMessage()."\n"); + if ($EXPERT) + file_put_contents ("php://stderr", $e->getTraceAsString()."\n"); + } exit; } }