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.

Since:
1.0
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
clone, equals, finalize, 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.
Since:
1.0

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.
Since:
1.0
Method Detail

getCode

public int getCode()
Gets the error code.

Returns:
the error code.
Since:
1.0

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable
Since:
1.0

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.
Since:
1.0


Copyright © 2012. All Rights Reserved.