Package org.jboss.resteasy.spi

Examples of org.jboss.resteasy.spi.UnhandledException


         writeJaxrsResponse(response, jaxrsResponse);
      }
      catch (WebApplicationException ex)
      {
         if (response.isCommitted())
            throw new UnhandledException("Request was committed couldn't handle exception", ex);
         // don't think I want to call writeJaxrsResponse infinately! so we'll just write the status
         response.reset();
         response.setStatus(ex.getResponse().getStatus());

      }
      catch (Exception e1)
      {
         throw new UnhandledException(e1)// we're screwed, can't handle the exception
      }
   }
View Full Code Here


   }

   protected void handleWebApplicationException(HttpResponse response, WebApplicationException wae)
   {
      if (!(wae instanceof NoLogWebApplicationException)) logger.error("failed to execute", wae);
      if (response.isCommitted()) throw new UnhandledException("Request was committed couldn't handle exception", wae);

      writeFailure(response, wae.getResponse());
   }
View Full Code Here

                     {
                        internalResume(Response.status(503).build());
                     }
                     catch (Exception e)
                     {
                        throw new UnhandledException(e);
                     }
                     finally
                     {
                        done = true;
                     }
View Full Code Here

      if ((jaxrsResponse = executeExceptionMapperForClass(e, ApplicationException.class)) != null) {
         return jaxrsResponse;
      }
      jaxrsResponse = unwrapException(request, e);
      if (jaxrsResponse == null) {
         throw new UnhandledException(e.getCause());
      }
      return jaxrsResponse;
   }
View Full Code Here

      else if (e instanceof Failure) {
         return handleFailure(request, (Failure) e);
      }
      else {
         logger.error("Unknown exception while executing " + request.getHttpMethod() + " " + request.getUri().getPath(), e);
         throw new UnhandledException(e);
      }
   }
View Full Code Here

      return true;
   }

   public void writeException(HttpRequest request, HttpResponse response, Throwable e)
   {
      if (response.isCommitted()) throw new UnhandledException("Response is committed, can't handle exception", e);
      Response handledResponse = new ExceptionHandler(providerFactory, unwrappedExceptions).handleException(request, e);
      if (handledResponse == null) throw new UnhandledException(e);
      try
      {
         ServerResponseWriter.writeNomapResponse(((BuiltResponse) handledResponse), request, response, providerFactory);
      }
      catch (Exception e1)
      {
         throw new UnhandledException(e1);
      }
   }
View Full Code Here

      }
      catch (Exception e)
      {
         //logger.error("invoke() failed mapping exception", e);
         jaxrsResponse = new ExceptionHandler(providerFactory, unwrappedExceptions).handleException(request, e);
         if (jaxrsResponse == null) throw new UnhandledException(e);
      }
      return jaxrsResponse;
   }
View Full Code Here

            response.sendError(requestWrapper.getErrorCode(), requestWrapper
                    .getErrorMessage());
         }
         catch (Exception e)
         {
            throw new UnhandledException(e);
         }
         return null;
      }
      if (requestWrapper.getAbortedResponse() != null)
      {
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.spi.UnhandledException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.