public function prepare(Exception $exception)
  {
    if ($exception instanceof NotFoundHttpException) {
      return $exception->createsClientError();
    } else if ($exception instanceof ServiceUnavailableHttpException) {
      return $exception->createsServerError();
    }

    return $exception;
  }
public function prepare(Exception $exception)
  {
    if ($exception instanceof NotFoundHttpException) {
      return $exception->createsClientError();
    } else if ($exception instanceof ServiceUnavailableHttpException) {
      return $exception->createsServerError();
    }

    return $exception;
  }
public function prepare ( Exception $ exception ) { if ( $ exception instanceof NotFoundHttpException ) { return $ exception -> createsClientError ( ) ; } else if ( $ exception instanceof ServiceUnavailableHttpException ) { return $ exception -> createsServerError ( ) ; } return $ exception ; }
Prepare and convert exceptions

@param Exception $exception
@return Exception $exception
Prepare and convert exceptions