You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-07-29 22:41:11 +03:00
drop some dies; use Exception and catch after dispatch() - see #197
This commit is contained in:
@ -39,7 +39,7 @@ class PostfixAdmin {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $version ='0.2';
|
||||
public $version ='0.3';
|
||||
|
||||
/**
|
||||
* Standard input stream.
|
||||
@ -407,8 +407,13 @@ define("POSTFIXADMIN_CLI", 1);
|
||||
require_once(dirname(__FILE__) . '/../common.php');
|
||||
|
||||
$dispatcher = new PostfixAdmin($argv);
|
||||
$retval = $dispatcher->dispatch();
|
||||
|
||||
try {
|
||||
$retval = $dispatcher->dispatch();
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$dispatcher->stderr("Execution Exception: " . $e->getMessage());
|
||||
$retval = 1;
|
||||
}
|
||||
exit($retval);
|
||||
|
||||
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|
||||
|
Reference in New Issue
Block a user