本文整理匯總了PHP中add::handle_error方法的典型用法代碼示例。如果您正苦於以下問題:PHP add::handle_error方法的具體用法?PHP add::handle_error怎麽用?PHP add::handle_error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類add
的用法示例。
在下文中一共展示了add::handle_error方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: print_exception
/**
* Print the exception
*
* @since ADD MVC 0.7
*/
public function print_exception()
{
add::handle_error(E_USER_ERROR, $this->getMessage(), $this->getFile(), $this->getLine(), $this->data);
}
示例2: handle_error
/**
* handle_error()
* callback function for handling trigger_error() errors
*
* @param int $errno contains the level of the error raised, as an integer.
* @param string $errstr contains the error message, as a string.
* @param string $errfile contains the filename that the error was raised in, as a string.
* @param int $errline contains the line number the error was raised at, as an integer.
* @param array $errcontext an array that points to the active symbol table at the point the error occurred. In other words, errcontext will contain an array of every variable that existed in the scope the error was triggered in. User error handler must not modify error context.
*
* @see http://www.php.net/manual/en/function.set-error-handler.php
* @version 1.0
*/
function handle_error($errno, $errstr, $errfile = NULL, $errline = NULL, $errcontext = NULL)
{
return add::handle_error($errno, $errstr, $errfile, $errline, $errcontext);
}
示例3: handle_error
/**
* handle_error()
* callback function for handling trigger_error() errors
*
* @param int $errno contains the level of the error raised, as an integer.
* @param string $errstr contains the error message, as a string.
* @param string $errfile contains the filename that the error was raised in, as a string.
* @param int $errline contains the line number the error was raised at, as an integer.
* @param array $errcontext an array that points to the active symbol table at the point the error occurred. In other words, errcontext will contain an array of every variable that existed in the scope the error was triggered in. User error handler must not modify error context.
*
* @see http://www.php.net/manual/en/function.set-error-handler.php
* @version 1.0
*/
function handle_error($errno, $errstr, $errfile = NULL, $errline = NULL, $errcontext = NULL)
{
trigger_error("Deprecated handle_error function", E_USER_DEPRECATED);
return add::handle_error($errno, $errstr, $errfile, $errline, $errcontext);
}