cvs: pear-core /PEAR Exception.php

From: Date: Thu, 02 Sep 2004 02:36:00 +0000
Subject: cvs: pear-core /PEAR Exception.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-23570@lists.php.net to get a copy of this message
cellog Wed Sep 1 22:36:00 2004 EDT Modified files: /pear-core/PEAR Exception.php Log: fix phpdoc spacing http://cvs.php.net/diff.php/pear-core/PEAR/Exception.php?r1=1.9&r2=1.10&ty=u Index: pear-core/PEAR/Exception.php diff -u pear-core/PEAR/Exception.php:1.9 pear-core/PEAR/Exception.php:1.10 --- pear-core/PEAR/Exception.php:1.9 Wed Sep 1 22:32:17 2004 +++ pear-core/PEAR/Exception.php Wed Sep 1 22:36:00 2004 @@ -18,79 +18,79 @@ // | Bertrand Mansion <bmansion@mamasam.com> | // +----------------------------------------------------------------------+ // -// $Id: Exception.php,v 1.9 2004/09/02 02:32:17 cellog Exp $ +// $Id: Exception.php,v 1.10 2004/09/02 02:36:00 cellog Exp $ define('PEAR_OBSERVER_PRINT', -2); define('PEAR_OBSERVER_TRIGGER', -4); define('PEAR_OBSERVER_DIE', -8); /** -* Base PEAR_Exception Class -* -* 1) Features: -* -* - Nestable exceptions (throw new PEAR_Exception($msg, $prev_exception)) -* - Definable triggers, shot when exceptions occur -* - Pretty and informative error messages -* - Added more context info avaible (like class, method or cause) -* -* 2) Ideas: -* -* - Maybe a way to define a 'template' for the output -* -* 3) Inherited properties from PHP Exception Class: -* -* protected $message -* protected $code -* protected $line -* protected $file -* private $trace -* -* 4) Inherited methods from PHP Exception Class: -* -* __clone -* __construct -* getMessage -* getCode -* getFile -* getLine -* getTraceSafe -* getTraceSafeAsString -* __toString -* -* 5) Usage example -* -* <code> -* require_once 'PEAR/Exception.php'; -* -* class Test { -* function foo() { -* throw new PEAR_Exception('Error Message', ERROR_CODE); -* } -* } -* -* function myLogger($pear_exception) { -* echo $pear_exception->getMessage(); -* } -* // each time a exception is thrown the 'myLogger' will be called -* // (its use is completely optional) -* PEAR_Exception::addObserver('myLogger'); -* $test = new Test; -* try { -* $test->foo(); -* } catch (PEAR_Exception $e) { -* print $e; -* } -* </code> -* -* @since PHP 5 -* @package PEAR -* @version $Revision: 1.9 $ -* @author Tomas V.V.Cox <cox@idecnet.com> -* @author Hans Lellelid <hans@velum.net> -* @author Bertrand Mansion <bmansion@mamasam.com> -* -*/ + * Base PEAR_Exception Class + * + * 1) Features: + * + * - Nestable exceptions (throw new PEAR_Exception($msg, $prev_exception)) + * - Definable triggers, shot when exceptions occur + * - Pretty and informative error messages + * - Added more context info avaible (like class, method or cause) + * + * 2) Ideas: + * + * - Maybe a way to define a 'template' for the output + * + * 3) Inherited properties from PHP Exception Class: + * + * protected $message + * protected $code + * protected $line + * protected $file + * private $trace + * + * 4) Inherited methods from PHP Exception Class: + * + * __clone + * __construct + * getMessage + * getCode + * getFile + * getLine + * getTraceSafe + * getTraceSafeAsString + * __toString + * + * 5) Usage example + * + * <code> + * require_once 'PEAR/Exception.php'; + * + * class Test { + * function foo() { + * throw new PEAR_Exception('Error Message', ERROR_CODE); + * } + * } + * + * function myLogger($pear_exception) { + * echo $pear_exception->getMessage(); + * } + * // each time a exception is thrown the 'myLogger' will be called + * // (its use is completely optional) + * PEAR_Exception::addObserver('myLogger'); + * $test = new Test; + * try { + * $test->foo(); + * } catch (PEAR_Exception $e) { + * print $e; + * } + * </code> + * + * @since PHP 5 + * @package PEAR + * @version $Revision: 1.10 $ + * @author Tomas V.V.Cox <cox@idecnet.com> + * @author Hans Lellelid <hans@velum.net> + * @author Bertrand Mansion <bmansion@mamasam.com> + * + */ class PEAR_Exception extends Exception { protected $cause;

« previous php.pear.cvs (#23570) next »