org.apache.hcatalog.templeton
Class SimpleWebException

Object
  extended by Throwable
      extended by SimpleWebException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadParam, BusyException, CallbackFailedException, HcatException, NotAuthorizedException, QueueException

public class SimpleWebException
extends Throwable

Simple exception that will return a json error payload if thrown from a JAX web server. We skip using WebApplicationException and instead map our own so that Jersey doesn't log our exceptions as error in the output log. See SimpleExceptionMapper.

See Also:
Serialized Form

Field Summary
 int httpCode
           
 Map<String,Object> params
           
 
Constructor Summary
SimpleWebException(int httpCode, String msg)
           
SimpleWebException(int httpCode, String msg, Map<String,Object> params)
           
 
Method Summary
static Response buildMessage(int httpCode, Map<String,Object> params, String msg)
           
 Response getResponse()
           
 
Methods inherited from class Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

httpCode

public int httpCode

params

public Map<String,Object> params
Constructor Detail

SimpleWebException

public SimpleWebException(int httpCode,
                          String msg)

SimpleWebException

public SimpleWebException(int httpCode,
                          String msg,
                          Map<String,Object> params)
Method Detail

getResponse

public Response getResponse()

buildMessage

public static Response buildMessage(int httpCode,
                                    Map<String,Object> params,
                                    String msg)