|
PHP5中文手册
set_exception_handler(PHP 5) set_exception_handler — Sets a user-defined exception handler function 说明
string set_exception_handler
( callback $exception_handler
)
Sets the default exception handler if an exception is not caught within a try/catch block. Execution will stop after the exception_handler is called. 参数
返回值Returns the name of the previously defined exception handler, or NULL on error. If no previous handler was defined, NULL is also returned. 范例
Example#1 set_exception_handler() example
<?php 参见restore_exception_handler(), restore_error_handler(), error_reporting(), 有关 callback 类型的信息, 和 PHP 5 Exceptions. |