1
0
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:
David Goodwin
2019-09-14 21:01:09 +01:00
parent 2ff05bc737
commit 17a50c51f1
2 changed files with 32 additions and 31 deletions

View File

@ -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: */