protected Response handleApplicationException(HttpRequest request, ApplicationException e, RESTEasyTracingLogger logger) { Response jaxrsResponse = null; // See if there is a mapper for ApplicationException if ((jaxrsResponse = executeExceptionMapperForClass(e, ApplicationException.class, logger)) != null) { return jaxrsResponse; } jaxrsResponse = unwrapException(request, e, logger); if (jaxrsResponse == null) { throw new UnhandledException(e.getCause()); } return jaxrsResponse; }
throw new ApplicationException(e.getCause());
throw new ApplicationException(e.getCause());
throw new ApplicationException(cause);
@Override public Response toResponse(ApplicationException exception) { _logger.error("ApplicationException,", exception); // As this mapper will override all others, we need to manually delegate exception handling Throwable cause = exception.getCause(); if (cause instanceof UnhandledException) { return unhandledExceptionMapper.toResponse((UnhandledException) cause); } else { return ExceptionMapperUtils.buildResponseWithCors(exception, Response.Status.INTERNAL_SERVER_ERROR); } } }
throw new ApplicationException(e.getCause()); throw new ApplicationException(e.getCause());
@Override public Response toResponse(ApplicationException exception) { _logger.error("ApplicationException,", exception); // As this mapper will override all others, we need to manually delegate exception handling Throwable cause = exception.getCause(); if (cause instanceof UnhandledException) { return unhandledExceptionMapper.toResponse((UnhandledException) cause); } else { return ExceptionMapperUtils.buildResponseWithCors(exception, Response.Status.INTERNAL_SERVER_ERROR); } } }
throw new ApplicationException(e.getCause());
protected Response handleApplicationException(HttpRequest request, ApplicationException e, RESTEasyTracingLogger logger) { Response jaxrsResponse = null; // See if there is a mapper for ApplicationException if ((jaxrsResponse = executeExceptionMapperForClass(e, ApplicationException.class, logger)) != null) { return jaxrsResponse; } jaxrsResponse = unwrapException(request, e, logger); if (jaxrsResponse == null) { throw new UnhandledException(e.getCause()); } return jaxrsResponse; }
throw new ApplicationException(e.getCause());
protected Response handleApplicationException(HttpRequest request, ApplicationException e) { Response jaxrsResponse = null; // See if there is a mapper for ApplicationException if ((jaxrsResponse = executeExceptionMapperForClass(e, ApplicationException.class)) != null) { return jaxrsResponse; } jaxrsResponse = unwrapException(request, e); if (jaxrsResponse == null) { throw new UnhandledException(e.getCause()); } return jaxrsResponse; }
throw new ApplicationException(Messages.MESSAGES.failedToConstruct(constructor.toString()), e.getCause());
throw new ApplicationException(e);
throw new ApplicationException(e);
public void inject(HttpRequest request, HttpResponse response, Object target) throws Failure { for (Map.Entry<Field, ValueInjector> entry : fieldMap.entrySet()) { try { entry.getKey().set(target, entry.getValue().inject(request, response)); } catch (IllegalAccessException e) { throw new InternalServerErrorException(e); } } for (SetterMethod setter : setters) { try { setter.method.invoke(target, setter.extractor.inject(request, response)); } catch (IllegalAccessException e) { throw new InternalServerErrorException(e); } catch (InvocationTargetException e) { throw new ApplicationException(e.getCause()); } } }
throw new ApplicationException(e.getCause());
throw new ApplicationException(e.getCause());
public void inject(HttpRequest request, HttpResponse response, Object target) throws Failure { for (FieldInjector injector : fields) { try { injector.param.getField().set(target, injector.injector.inject(request, response)); } catch (IllegalAccessException e) { throw new InternalServerErrorException(e); } } for (SetterInjector injector : setters) { try { injector.param.getSetter().invoke(target, injector.injector.inject(request, response)); } catch (IllegalAccessException e) { throw new InternalServerErrorException(e); } catch (InvocationTargetException e) { throw new ApplicationException(e.getCause()); } } }
throw new ApplicationException(e.getCause());