*/ /** * AP5L Exception */ class AP5L_Exception extends Exception { /** * Language independent exception details. * * @var array */ public $details = array(); /** * Default factory method */ static function &factory($message = '', $code = 0, $details = array()) { $e = new AP5L_Exception($message, $code); $e -> details = $details; return $e; } /** * Factory method to throw a PEAR error as an exception */ static function &fromPEAR($pearError) { $e = self::factory( $pearError -> getMessage(), $pearError -> getCode() ); return $e; } } ?>