; * @copyright Tommy Gildseth, September 2004 * @version 0.1 * @access public * @package DBTableInfo */ class DBTIError extends PEAR_Error { //{{{ Class members /** * Array of error code to error message mappings. * * @access private */ var $_messages = array(DBTI_ERROR => 'Unknown error', DBTI_WRONG_TABLE => 'Unable to retrieve information. Did you supply the correct table name?', DBTI_UNSUPORTED_DATABASE => 'I don\'t know how to work with this RDBMS.', DBTI_NO_CURRVAL => 'There doesn\'t seem exist a currval() for the sequence for this session.', DBTI_NO_SEQUENCE => 'There is no sequence on this table.'); // }}} // {{{ constructor DBTInfoError(int code) /** * DBInfoError constructor. * * @param int $code error code * @access public */ function DBTIError($code = DBTI_ERROR) { $this->PEAR_Error('DBTInfo Error: ' . $this->_messages[$code], $code, PEAR_ERROR_RETURN, E_USER_NOTICE); } // }}} } ?>