本文整理匯總了PHP中MDB2_Schema::raiseError方法的典型用法代碼示例。如果您正苦於以下問題:PHP MDB2_Schema::raiseError方法的具體用法?PHP MDB2_Schema::raiseError怎麽用?PHP MDB2_Schema::raiseError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MDB2_Schema
的用法示例。
在下文中一共展示了MDB2_Schema::raiseError方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: xml_error_string
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;
}
示例2:
/**
* 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;
}
示例3:
function &raiseError($ecode, $msg = null)
{
$error =& MDB2_Schema::raiseError($ecode, null, null, $msg);
return $error;
}
示例4:
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;
}