function &raiseError($msg = null, $xmlecode = 0, $xp = null, $ecode = MDB2_SCHEMA_ERROR_PARSE) { if (is_null($this->error)) { $error = ''; if (is_resource($msg)) { $error .= 'Parser error: ' . xml_error_string(xml_get_error_code($msg)); $xp = $msg; } else { $error .= 'Parser error: ' . $msg; if (!is_resource($xp)) { $xp = $this->parser; } } if ($error_string = xml_error_string($xmlecode)) { $error .= ' - ' . $error_string; } if (is_resource($xp)) { $byte = @xml_get_current_byte_index($xp); $line = @xml_get_current_line_number($xp); $column = @xml_get_current_column_number($xp); $error .= " - Byte: {$byte}; Line: {$line}; Col: {$column}"; } $error .= "\n"; $this->error =& MDB2_Schema::raiseError($ecode, null, null, $error); } return $this->error; }
/** * This method is used to communicate an error and invoke error * callbacks etc. Basically a wrapper for PEAR::raiseError * without the message string. * * @param int|PEAR_Error integer error code or and PEAR_Error instance * @param int error mode, see PEAR_Error docs * * error level (E_USER_NOTICE etc). If error mode is * PEAR_ERROR_CALLBACK, this is the callback function, * either as a function name, or as an array of an * object and method name. For other error modes this * parameter is ignored. * @param string Extra debug information. Defaults to the last * query and native error code. * @return object a PEAR error object * @access public * @see PEAR_Error */ function &raiseError($code = null, $mode = null, $options = null, $userinfo = null) { $error =& MDB2_Schema::raiseError($code, $mode, $options, $userinfo); return $error; }
function &raiseError($ecode, $msg = null) { $error =& MDB2_Schema::raiseError($ecode, null, null, $msg); return $error; }
function &raiseError($msg = null, $ecode = MDB2_SCHEMA_ERROR_PARSE) { if (is_null($this->error)) { $error = 'Parser error: ' . $msg . "\n"; $this->error =& MDB2_Schema::raiseError($ecode, null, null, $error); } return $this->error; }