/** * Creates a new database exception * * @param string|PEAR_Error $message either the error message or a PEAR * error describing the MDB2 error that * occurred. * @param integer $code the error code of this exception. */ 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); }
/** * Creates a new document type exception * * @param string $message the message of the exception. * @param integer $code the code of the exception. * @param string $shortname the shortname of the invalid document type. */ public function __construct($message = null, $code = 0, $shortname = null) { parent::__construct($message, $code); $this->shortname = $shortname; }