try
{
// Code that may throw an Exception or Error.
}catch (Exception $e) {
} catch (Error $t) {
}
php7新增 Throwable 手册
Throwable is the base interface for any object that can be thrown via a throwstatement in PHP 7, including Error and Exception.
PHP finaly 图片来源