本文整理汇总了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;
}