Yaf_Dispatcher::setErrorHandler

(Yaf >=1.0.0)

Yaf_Dispatcher::setErrorHandler设置错误处理函数

说明

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

设置错误处理函数,一般在application.dispatcher.throwException关闭的情况下,Yaf会在出错的时候触发错误,这个时候,如果设置了错误处理函数,则会把控制交给错误处理函数处理。

因此,当错误发生的时候这个错误处理函数将被调用。

参数

callback

错误处理的回调函数

error_types

返回值

参见

add a note add a note

User Contributed Notes 1 note

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

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