问下laravel的Exception如何运作的?
我项目中的 app/Exceptions 目录下又三个文件。
有ApiException,AutoException,Handler 。
我想问下,什么样的异常会被那个文件捕获的,又是怎么捕获的,最好能将原理告知下?
你可以通过
Handler
文件捕获自定义异常想要了解原理的话,看下
Illuminate\Foundation\Bootstrap\HandleExceptions::bootstrap
还有set_error_handler、set_exception_handler、register_shutdown_function