Exemplo n.º 1
0
 /**
  * Handles exceptions and sets HTTP return code
  *
  * @param \Exception $exception
  */
 public final function exceptionHandler(\Exception $exception)
 {
     $this->add($exception);
     $code = $exception->getCode() == 0 || !HTTP\Response::getCodeDescription($exception->getCode()) ? 400 : $exception->getCode();
     $this->response->setCode($code);
     $this->send();
     die;
 }