org.glassfish.jersey.server.internal.process
Class MappableException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.ws.rs.ProcessingException
                  extended by org.glassfish.jersey.server.internal.process.MappableException
All Implemented Interfaces:
Serializable

public class MappableException
extends ProcessingException

A runtime exception that contains a cause, a checked or runtime exception, that may be mapped to a Response instance.

The runtime will catch such exceptions and attempt to map the cause exception to a registered ExceptionMapper that provides an appropriate Response instance.

Author:
Paul Sandoz, Marek Potociar (marek.potociar at oracle.com)
See Also:
Serialized Form

Constructor Summary
MappableException(String message, Throwable cause)
          Construct a new mappable exception with the supplied message and cause.
MappableException(Throwable cause)
          Construct a mappable container exception.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappableException

public MappableException(Throwable cause)
Construct a mappable container exception.

Parameters:
cause - the cause. If the cause is an instance of MappableException then the cause of this exception will be obtained by recursively searching though the exception causes until a cause is obtained that is not an instance of MappableException.

MappableException

public MappableException(String message,
                         Throwable cause)
Construct a new mappable exception with the supplied message and cause.

Parameters:
message - the exception message.
cause - the exception cause.


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.