Yaf_Dispatcher::setErrorHandler

(Yaf >=1.0.0)

Yaf_Dispatcher::setErrorHandler设置错误处理

说明

public Yaf_Dispatcher::setErrorHandler(call $callback, int $error_types): Yaf_Dispatcher

为 Yaf 设置错误处理程序,当 application.dispatcher.throwException 关闭时,Yaf 将在发生意外错误时触发可捕获错误。

因此,将在错误出现时调用该错误处理程序。

参数

callback

可调用的回调

error_types

返回值

参见

add a note

User Contributed Notes 1 note

up
1
gianjason#gmail.com
11 years ago
eg:

<?php $dispatcher->setErrorHandler(array(get_class($this),'error_handler')); ?>
To Top