Location: PHPKode > projects > Swat > Swat-1.4.108/Swat-1.4.108/SwatDB/exceptions/SwatDBException.php
<?php

/* vim: set noexpandtab tabstop=4 shiftwidth=4 foldmethod=marker: */

require_once 'Swat/exceptions/SwatException.php';
require_once 'PEAR.php';

/**
 * A SwatDB Exception.
 *
 * @package   SwatDB
 * @copyright 2005-2006 silverorange
 * @license   http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
 */
class SwatDBException extends SwatException
{
	// {{{ private function ___construct()

	public function __construct($message = null, $code = 0)
	{
		if (is_object($message) && ($message instanceof PEAR_Error)) {
			$error = $message;
			$message = $error->getMessage();
			$message .= "\n".$error->getUserInfo();
			$code = $error->getCode();
		}

		parent::__construct($message, $code);
	}

	// }}}
}

?>
Return current item: Swat