Hi Jim,

Connectors only report errors via the status code and not via exceptions.
This is a design choice to prevent the proliferation of exceptions and
provide a consistent status handling mechanism, for both local IO issues and
remote ones (HTTP error codes for examples).

Best regards,
Jerome  

> -----Message d'origine-----
> De : Jim Alateras [mailto:[EMAIL PROTECTED] 
> Envoyé : jeudi 18 octobre 2007 01:07
> À : [email protected]
> Objet : HttpClientHelper needs to be fixed
> 
> The checked-in version of HttpClietHelper on the trunk needs 
> to be fixed
> 
>      @Override
>      public void handle(Request request, Response response) {
>          try {
>              HttpClientCall httpCall = 
> getConverter().toSpecific(this, 
> request);
>              getConverter().commit(httpCall, request, response);
>          } catch (Exception e) {
>              getLogger().log(Level.INFO,
>                      "Error while handling an HTTP client call", e);
> <<<<<<< .mine
> 
>              // need to throw a runtime exception here so that we can
>              // signal to the client
>              throw new RuntimeException("Error while handling a HTTP 
> client call", e);
> =======
>              response.setStatus(Status.CONNECTOR_ERROR_INTERNAL, 
> e.getMessage());
>  >>>>>>> .r2125
>          }
>      }

Reply via email to