本文整理汇总了PHP中_drupal_get_last_caller函数的典型用法代码示例。如果您正苦于以下问题:PHP _drupal_get_last_caller函数的具体用法?PHP _drupal_get_last_caller怎么用?PHP _drupal_get_last_caller使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_drupal_get_last_caller函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exceptionHandler
/**
* Handle exceptions.
*
* @see set_exception_handler
*/
protected function exceptionHandler($exception)
{
$backtrace = $exception->getTrace();
// Push on top of the backtrace the call that generated the exception.
array_unshift($backtrace, array('line' => $exception->getLine(), 'file' => $exception->getFile()));
require_once DRUPAL_ROOT . '/includes/errors.inc';
// The exception message is run through check_plain() by _drupal_decode_exception().
$this->error(t('%type: !message in %function (line %line of %file).', _drupal_decode_exception($exception)), 'Uncaught exception', _drupal_get_last_caller($backtrace));
}
示例2: exceptionHandler
/**
* Handle exceptions.
*
* @see set_exception_handler
*/
protected function exceptionHandler($exception)
{
$backtrace = $exception->getTrace();
// Push on top of the backtrace the call that generated the exception.
array_unshift($backtrace, array('line' => $exception->getLine(), 'file' => $exception->getFile()));
$this->error($exception->getMessage(), 'Uncaught exception', _drupal_get_last_caller($backtrace));
}