From: Stig Bakken Date: Sun, 7 Apr 2002 16:48:24 +0000 (+0000) Subject: * use the UI's displayFatalError method X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~819 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5bdc0eaafe465f5a1f8c988687340dcbbe372053;p=php * use the UI's displayFatalError method --- diff --git a/pear/scripts/pear.in b/pear/scripts/pear.in index 9fe5f7c1f7..a3361edf3f 100644 --- a/pear/scripts/pear.in +++ b/pear/scripts/pear.in @@ -33,7 +33,7 @@ require_once 'Console/Getopt.php'; PEAR_Command::setFrontendType('CLI'); $all_commands = PEAR_Command::getCommands(); $cmd_options = PEAR_Command::getOptions(); - +$ui = &PEAR_Command::getFrontendObject(); $progname = basename(__FILE__); // XXX change Getopt to use raiseError() ? @@ -43,7 +43,7 @@ if (PEAR::isError($options)) { usage($options); } -PEAR::setErrorHandling(PEAR_ERROR_DIE, "$progname: %s\n"); +PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError")); $opts = $options[0]; $pear_user_config = '';