function ErrorMsg() { $this->_errorMsg = @fbsql_error($this->_connectionID); return $this->_errorMsg; }
/** * Produces a DB_Error object regarding the current problem * * @param int $errno if the error is being manually raised pass a * DB_ERROR* constant here. If this isn't passed * the error information gathered from the DBMS. * * @return object the DB_Error object * * @see DB_common::raiseError(), * DB_fbsql::errorNative(), DB_common::errorCode() */ function fbsqlRaiseError($errno = null) { if ($errno === null) { $errno = $this->errorCode(fbsql_errno($this->connection)); } return $this->raiseError($errno, null, null, null, @fbsql_error($this->connection)); }
public function error() { if (!empty($this->connect)) { return fbsql_error($this->connect); } else { return false; } }
/** * This method is used to communicate an error and invoke error * callbacks etc. Basically a wrapper for MDB::raiseError * that checks for native error msgs. * * @param integer $errno error code * @param string $message userinfo message * @return object a PEAR error object * @access public * @see PEAR_Error */ function fbsqlRaiseError($errno = NULL, $message = NULL) { if ($errno == NULL) { if ($this->connection) { $errno = @fbsql_errno($this->connection); } else { $errno = @fbsql_errno(); } } if ($this->connection) { $error = @fbsql_errno($this->connection); } else { $error = @fbsql_error(); } return $this->raiseError($this->errorCode($errno), NULL, NULL, $message, $error); }
/** * This method is used to collect information about an error * * @param integer $error * @return array * @access public */ function errorInfo($error = null) { if ($this->connection) { $native_code = @fbsql_errno($this->connection); $native_msg = @fbsql_error($this->connection); } else { $native_code = @fbsql_errno(); $native_msg = @fbsql_error(); } if (null === $error) { static $ecode_map; if (empty($ecode_map)) { $ecode_map = array(22 => MDB2_ERROR_SYNTAX, 85 => MDB2_ERROR_ALREADY_EXISTS, 108 => MDB2_ERROR_SYNTAX, 116 => MDB2_ERROR_NOSUCHTABLE, 124 => MDB2_ERROR_VALUE_COUNT_ON_ROW, 215 => MDB2_ERROR_NOSUCHFIELD, 217 => MDB2_ERROR_INVALID_NUMBER, 226 => MDB2_ERROR_NOSUCHFIELD, 231 => MDB2_ERROR_INVALID, 239 => MDB2_ERROR_TRUNCATED, 251 => MDB2_ERROR_SYNTAX, 266 => MDB2_ERROR_NOT_FOUND, 357 => MDB2_ERROR_CONSTRAINT_NOT_NULL, 358 => MDB2_ERROR_CONSTRAINT, 360 => MDB2_ERROR_CONSTRAINT, 361 => MDB2_ERROR_CONSTRAINT); } if (isset($ecode_map[$native_code])) { $error = $ecode_map[$native_code]; } } return array($error, $native_code, $native_msg); }