示例#1
0
 /**
  * @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]);
     }
 }
示例#2
0
 /**
  * @param SupervisorInterface $supervisor
  * @param SolverInterface[]|string[]|string[][] $handlers
  */
 private function setHandlers(SupervisorInterface $supervisor, $handlers)
 {
     foreach ($handlers as $exception => $handler) {
         $supervisor->setHandler($exception, $handler);
     }
 }