示例#1
0
 /**
  * @param Error|Exception $ex
  * @param mixed[] $params
  */
 protected function handleException($ex, $params)
 {
     try {
         $this->supervisor->solve($ex, $params);
     } catch (Error $ex) {
         $this->supervisor->solve($ex, $params);
     } catch (Exception $ex) {
         $this->supervisor->solve($ex, $params);
     }
 }
 /**
  * @param SupervisorInterface $supervisor
  * @param SolverInterface[]|string[]|string[][] $handlers
  */
 private function setSolvers(SupervisorInterface $supervisor, $handlers)
 {
     foreach ($handlers as $exception => $handler) {
         $supervisor->setSolver($exception, $handler);
     }
 }