Respect\Rest\Request::catchExceptions PHP Метод

catchExceptions() защищенный Метод

Does a catch-like operation on an exception based on previously declared instances from Router::exceptionRoute
protected catchExceptions ( Exception $e ) : mixed
$e Exception Any exception
Результат mixed A route forwarding or a silent null
    protected function catchExceptions($e)
    {
        foreach ($this->route->sideRoutes as $sideRoute) {
            $exceptionClass = get_class($e);
            if ($exceptionClass === $sideRoute->class || $sideRoute->class === 'Exception' || $sideRoute->class === '\\Exception') {
                $sideRoute->exception = $e;
                return $this->forward($sideRoute);
            }
        }
    }