]> granicus.if.org Git - php/commitdiff
* use the UI's displayFatalError method
authorStig Bakken <ssb@php.net>
Sun, 7 Apr 2002 16:48:24 +0000 (16:48 +0000)
committerStig Bakken <ssb@php.net>
Sun, 7 Apr 2002 16:48:24 +0000 (16:48 +0000)
pear/scripts/pear.in

index 9fe5f7c1f7c3cee8e576927fc9d7b8cbedf50617..a3361edf3fa519fdeadd416aefeedfe480d8dd37 100644 (file)
@@ -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 = '';