/** * @param string $origin * @param Error|Exception $ex */ protected function handleException($origin, $ex) { try { $this->manager->handle($ex, ['origin' => $origin]); } catch (Error $ex) { $this->manager->handle($ex, ['origin' => $origin]); } catch (Exception $ex) { $this->manager->handle($ex, ['origin' => $origin]); } }
/** * @param SupervisorInterface $supervisor * @param SolverInterface[]|string[]|string[][] $handlers */ private function setHandlers(SupervisorInterface $supervisor, $handlers) { foreach ($handlers as $exception => $handler) { $supervisor->setHandler($exception, $handler); } }