irm/lib/MDB.php
/**
     * Return a textual error message for a MDB error code
     *
     * @param   int     $value error code
     * @return  string  error message, or false if the error code was
     *                  not recognized
     * @access public
     */
Return a textual error message for a MDB error code

@param   int     $value error code
@return  string  error message, or false if the error code was
not recognized
@access public
Return a textual error message for a MDB error code @param int $value error code @return string error message or false if the error code was not recognized @access public
function errorMessage($value)
    {
        static $errorMessages;
        if (!isset($errorMessages)) {
            $errorMessages = array(
                MDB_ERROR                    => 'unknown error',
                MDB_ERROR_ALREADY_EXISTS     => 'already exists',
                MDB_ERROR_CANNOT_CREATE      => 'can not create',
                MDB_ERROR_CANNOT_ALTER       => 'can not alter',
                MDB_ERROR_CANNOT_REPLACE     => 'can not replace',
                MDB_ERROR_CANNOT_DELETE      => 'can not delete',
                MDB_ERROR_CANNOT_DROP        => 'can not drop',
                MDB_ERROR_CONSTRAINT         => 'constraint violation',
                MDB_ERROR_CONSTRAINT_NOT_NULL=> 'null value violates not-null constraint',
                MDB_ERROR_DIVZERO            => 'division by zero',
                MDB_ERROR_INVALID            => 'invalid',
                MDB_ERROR_INVALID_DATE       => 'invalid date or time',
                MDB_ERROR_INVALID_NUMBER     => 'invalid number',
                MDB_ERROR_MISMATCH           => 'mismatch',
                MDB_ERROR_NODBSELECTED       => 'no database selected',
                MDB_ERROR_NOSUCHFIELD        => 'no such field',
                MDB_ERROR_NOSUCHTABLE        => 'no such table',
                MDB_ERROR_NOT_CAPABLE        => 'MDB backend not capable',
                MDB_ERROR_NOT_FOUND          => 'not found',
                MDB_ERROR_NOT_LOCKED         => 'not locked',
                MDB_ERROR_SYNTAX             => 'syntax error',
                MDB_ERROR_UNSUPPORTED        => 'not supported',
                MDB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row',
                MDB_ERROR_INVALID_DSN        => 'invalid DSN',
                MDB_ERROR_CONNECT_FAILED     => 'connect failed',
                MDB_OK                       => 'no error',
                MDB_ERROR_NEED_MORE_DATA     => 'insufficient data supplied',
                MDB_ERROR_EXTENSION_NOT_FOUND=> 'extension not found',
                MDB_ERROR_NOSUCHDB           => 'no such database',
                MDB_ERROR_ACCESS_VIOLATION   => 'insufficient permissions',
                MDB_ERROR_MANAGER            => 'MDB_manager error',
                MDB_ERROR_MANAGER_PARSE      => 'MDB_manager schema parse error',
                MDB_ERROR_LOADMODULE         => 'Error while including on demand module',
                MDB_ERROR_TRUNCATED          => 'truncated',
                MDB_ERROR_DEADLOCK           => 'deadlock detected',
            );
        }
        if (MDB::isError($value)) {
            $value = $value->getCode();
        }
        return(isset($errorMessages[$value]) ?
           $errorMessages[$value] : $errorMessages[MDB_ERROR]);
    }
function errorMessage ( $ value ) { static $ errorMessages ; if ( ! isset ( $ errorMessages ) ) { $ errorMessages = array ( MDB_ERROR => 'unknown error' , MDB_ERROR_ALREADY_EXISTS => 'already exists' , MDB_ERROR_CANNOT_CREATE => 'can not create' , MDB_ERROR_CANNOT_ALTER => 'can not alter' , MDB_ERROR_CANNOT_REPLACE => 'can not replace' , MDB_ERROR_CANNOT_DELETE => 'can not delete' , MDB_ERROR_CANNOT_DROP => 'can not drop' , MDB_ERROR_CONSTRAINT => 'constraint violation' , MDB_ERROR_CONSTRAINT_NOT_NULL => 'null value violates not-null constraint' , MDB_ERROR_DIVZERO => 'division by zero' , MDB_ERROR_INVALID => 'invalid' , MDB_ERROR_INVALID_DATE => 'invalid date or time' , MDB_ERROR_INVALID_NUMBER => 'invalid number' , MDB_ERROR_MISMATCH => 'mismatch' , MDB_ERROR_NODBSELECTED => 'no database selected' , MDB_ERROR_NOSUCHFIELD => 'no such field' , MDB_ERROR_NOSUCHTABLE => 'no such table' , MDB_ERROR_NOT_CAPABLE => 'MDB backend not capable' , MDB_ERROR_NOT_FOUND => 'not found' , MDB_ERROR_NOT_LOCKED => 'not locked' , MDB_ERROR_SYNTAX => 'syntax error' , MDB_ERROR_UNSUPPORTED => 'not supported' , MDB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row' , MDB_ERROR_INVALID_DSN => 'invalid DSN' , MDB_ERROR_CONNECT_FAILED => 'connect failed' , MDB_OK => 'no error' , MDB_ERROR_NEED_MORE_DATA => 'insufficient data supplied' , MDB_ERROR_EXTENSION_NOT_FOUND => 'extension not found' , MDB_ERROR_NOSUCHDB => 'no such database' , MDB_ERROR_ACCESS_VIOLATION => 'insufficient permissions' , MDB_ERROR_MANAGER => 'MDB_manager error' , MDB_ERROR_MANAGER_PARSE => 'MDB_manager schema parse error' , MDB_ERROR_LOADMODULE => 'Error while including on demand module' , MDB_ERROR_TRUNCATED => 'truncated' , MDB_ERROR_DEADLOCK => 'deadlock detected' , ) ; } if ( MDB :: isError ( $ value ) ) { $ value = $ value -> getCode ( ) ; } return ( isset ( $ errorMessages [ $ value ] ) ? $ errorMessages [ $ value ] : $ errorMessages [ MDB_ERROR ] ) ; }
Return a textual error message for a MDB error code
Return a textual error message for a MDB error code