cvs: php4 /pear Makefile.in PEAR_ERROR.php PEAR_Error.php /pear/File Find.php

From: Date: Fri, 21 Jul 2000 18:34:38 +0000
Subject: cvs: php4 /pear Makefile.in PEAR_ERROR.php PEAR_Error.php /pear/File Find.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-842@lists.php.net to get a copy of this message
sterling Fri Jul 21 11:34:38 2000 EDT Added files: /php4/pear PEAR_Error.php Removed files: /php4/pear PEAR_ERROR.php Modified files: /php4/pear Makefile.in /php4/pear/File Find.php Log: New naming sequence for PEAR_Error - PEAR_ERROR -> PEAR_Error - $CLASSNAME -> $classname New naming sequence for Exceptions - ExceptionFileFind -> FileFindException. Index: php4/pear/Makefile.in diff -u php4/pear/Makefile.in:1.26 php4/pear/Makefile.in:1.27 --- php4/pear/Makefile.in:1.26 Thu Jul 20 23:47:18 2000 +++ php4/pear/Makefile.in Fri Jul 21 11:34:37 2000 @@ -19,7 +19,7 @@ DB/storage.php \ HTTP.php \ File/Find.php \ - PEAR_ERROR.php + PEAR_Error.php install-data-local: @if $(mkinstalldirs) $(peardir); then \ Index: php4/pear/File/Find.php diff -u php4/pear/File/Find.php:1.4 php4/pear/File/Find.php:1.5 --- php4/pear/File/Find.php:1.4 Thu Jul 20 23:44:20 2000 +++ php4/pear/File/Find.php Fri Jul 21 11:34:38 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Find.php,v 1.4 2000/07/21 06:44:20 sterling Exp $ +// $Id: Find.php,v 1.5 2000/07/21 18:34:38 sterling Exp $ // // Commonly needed functions searching directory trees // @@ -110,7 +110,7 @@ function isError ($var) { return (is_object ($var) && - get_class ($var) == 'ExceptionFileFind'); + substr (get_class ($var), -9) == 'Exception'); } /* @@ -171,14 +171,14 @@ //End Class } -class ExceptionFileFind extends PEAR_ERROR +class FileFindException extends PEAR_Error { var $CLASSNAME = 'ExceptionFileFind'; var $ERROR_MESSAGE_PREPEND = 'Error in ExceptionFileFind'; function ExceptionFileFind ($message, $file = __FILE__, $line = __LINE__) { - parent::PEAR_ERROR ($message, $file, $line); + parent::PEAR_Error ($message, $file, $line); } } Index: php4/pear/PEAR_Error.php +++ php4/pear/PEAR_Error.php <?php // // +----------------------------------------------------------------------+ // | PHP version 4.0 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available at through the world-wide-web at | // | http://www.php.net/license/2_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // // $Id: PEAR_Error.php,v 1.1 2000/07/21 18:34:37 sterling Exp $ // // Commonly needed functions searching directory trees // // // This class is based on ideas from Ulf Wendel // class PEAR_Error { var $classname = ''; var $error_message_prefix = ''; var $error_prepend = ''; var $error_append = ''; var $die_on_error = false; var $auto_print_error = false; var $level = 0; var $trigger_error = false; var $message = ''; var $file = ''; var $line = 0; /* * constructor, set the basics... */ function PEAR_Error ($message, $file = __FILE__, $line = __LINE__) { $this->message = $message; $this->file = $file; $this->line = $line; } /* * string getMessage (void) * Get the error message from an exception object. */ function getMessage () { return ($this->error_prepend . $this->error_message_prefix . $this->message . $this->error_append); } /* * string getType (void) * Get the name of the exception. */ function getType () { return ($this->classname); } }

« previous php.cvs (#842) next »