com.esri.core.io
Class EsriServiceException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.esri.core.io.EsriServiceException
All Implemented Interfaces:
Serializable

public class EsriServiceException
extends RuntimeException

An EsriServiceException is an exception indicating that an operation failed when processing a REST request.

See Also:
Serialized Form

Constructor Summary
EsriServiceException(int code, String msg)
          Instantiates an EsriServiceException with the given error message and code.
EsriServiceException(String msg)
          Instantiates an EsriServiceException with the given error message.
 
Method Summary
static EsriServiceException fromJson(org.codehaus.jackson.JsonParser parser)
          Retrieves a service error from a Json response.
 int getCode()
          Gets the error code.
 String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EsriServiceException

public EsriServiceException(String msg)
Instantiates an EsriServiceException with the given error message.

Parameters:
msg - the error message.

EsriServiceException

public EsriServiceException(int code,
                            String msg)
Instantiates an EsriServiceException with the given error message and code.

Parameters:
code - the error code.
msg - the error message.
Method Detail

getCode

public int getCode()
Gets the error code.

Returns:
the error code.

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

fromJson

public static EsriServiceException fromJson(org.codehaus.jackson.JsonParser parser)
Retrieves a service error from a Json response.

Returns:
the Exception or null if there is not error information.


Copyright © 2012. All Rights Reserved.