Package org.glassfish.jersey.server.internal.process

Examples of org.glassfish.jersey.server.internal.process.MappableException


                validator.validateResult(resource, resourceMethod, invocationResult);
            }

            return invocationResult;
        } catch (ValidationException ex) { // handle validation exceptions -> potentially mappable
            throw new MappableException(ex);
        }
    }
View Full Code Here


    private static RuntimeException mapTargetToRuntimeEx(Throwable throwable) {
        if (throwable instanceof WebApplicationException) {
            return (WebApplicationException) throwable;
        }
        // handle all exceptions as potentially mappable (incl. ProcessingException)
        return new MappableException(throwable);
    }
View Full Code Here

        } catch (MessageBodyProviderNotFoundException nfe) {
            throw nfe;
        } catch (MappableException mappable) {
            throw mappable;
        } catch (Exception e) {
            throw new MappableException(e);
        }

    }
View Full Code Here

        } catch (MessageBodyProviderNotFoundException nfe) {
            throw new InternalServerErrorException(nfe);
        } catch (MappableException mappable) {
            throw mappable;
        } catch (Exception e) {
            throw new MappableException(e);
        }

    }
View Full Code Here

        } catch (MessageBodyProviderNotFoundException e) {
            throw new NotSupportedException(e);
        } catch (ProcessingException e) {
            throw e;
        } catch (RuntimeException e) {
            throw new MappableException("Exception obtaining parameters", e);
        }
    }
View Full Code Here

                    final Throwable cause = ex.getCause();
                    if (cause instanceof WebApplicationException) {
                        throw (WebApplicationException) cause;
                    }
                    // handle all exceptions as potentially mappable (incl. ProcessingException)
                    throw new MappableException(cause);
                } catch (Throwable t) {
                    throw new ProcessingException(t);
                }
            }
        };
View Full Code Here

                } else {
                    skipFinally = true;
                    if (ex instanceof RuntimeException) {
                        throw (RuntimeException) ex;
                    } else {
                        throw new MappableException(ex);
                    }
                }
            } finally {
                if (!skipFinally) {
                    boolean close = !response.isChunked();
View Full Code Here

        public boolean resume(final Throwable error) {
            return resume(new Runnable() {
                @Override
                public void run() {
                    try {
                        responder.process(new MappableException(error));
                    } catch (final Throwable error) {
                        // Ignore the exception - already resumed but may be rethrown by ContainerResponseWriter#failure.
                    }
                }
            });
View Full Code Here

            for (ContainerRequestFilter filter : sortedRequestFilters) {
                final long filterTimestamp = tracingLogger.timestamp(filterEvent);
                try {
                    filter.filter(request);
                } catch (Exception exception) {
                    throw new MappableException(exception);
                } finally {
                    processedCount++;
                    tracingLogger.logDuration(filterEvent, filterTimestamp, filter);
                }
View Full Code Here

                for (ContainerResponseFilter filter : sortedResponseFilters) {
                    final long filterTimestamp = tracingLogger.timestamp(ServerTraceEvent.RESPONSE_FILTER);
                    try {
                        filter.filter(request, responseContext);
                    } catch (Exception ex) {
                        throw new MappableException(ex);
                    } finally {
                        processedCount++;
                        tracingLogger.logDuration(ServerTraceEvent.RESPONSE_FILTER, filterTimestamp, filter);
                    }
                }
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.server.internal.process.MappableException

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.