Spatial DataBlade
JAVA API v8.21

com.ibm.spatial
Class SpatialException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.ibm.spatial.SpatialException
All Implemented Interfaces:
java.io.Serializable

public class SpatialException
extends java.lang.Exception

SpatialException is thrown whenever errors are encountered on the operations of the geometry object. Besides the detail message, a SpatialException has an error code and an optional error location. A SpatialException may be wrapped around another exception.

Error codes are the message types defined in Messages.

See Also:
Messages, EventLocation, Serialized Form

Constructor Summary
SpatialException()
          Creates a new SpatialException.
SpatialException(int errorCode, EventLocation location, java.lang.Exception e)
          Creates a new SpatialException wrapping an existing exception.
SpatialException(int errorCode, java.lang.String message)
          Creates a new SpatialException.
SpatialException(int errorCode, java.lang.String message, EventLocation location)
          Creates a new SpatialException.
 
Method Summary
 int getErrorCode()
          Retrieves the specific exception code for this SpatialException object.
 java.lang.Exception getException()
          Returns the embedded exception, if any.
 EventLocation getLocation()
          Returns the error location, if any.
 java.lang.String getMessage()
          Returns a message for this exception.
 java.lang.String toString()
          Override toString to pick up any embedded exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpatialException

public SpatialException()
Creates a new SpatialException.


SpatialException

public SpatialException(int errorCode,
                        java.lang.String message)
Creates a new SpatialException.

Parameters:
errorCode - The error or warning code.
message - The error or warning message.

SpatialException

public SpatialException(int errorCode,
                        java.lang.String message,
                        EventLocation location)
Creates a new SpatialException.

Parameters:
errorCode - The error or warning code.
message - The error or warning message.
location - An EventLocation associated to this exception

SpatialException

public SpatialException(int errorCode,
                        EventLocation location,
                        java.lang.Exception e)
Creates a new SpatialException wrapping an existing exception.

Parameters:
errorCode - The error or warning code.
location - An EventLocation associated to this exception
e - The exception to be wrapped in a SpatialException.
Method Detail

getMessage

public java.lang.String getMessage()
Returns a message for this exception.

If there is an embedded exception, and if the SpatialException has no detail message of its own, this method will return the detail message from the embedded exception.

Overrides:
getMessage in class java.lang.Throwable
Returns:
The error or warning message.
See Also:
SpatialManager.setLocale(java.util.Locale)

getErrorCode

public int getErrorCode()
Retrieves the specific exception code for this SpatialException object.

Returns:
The spatial error code.

getException

public java.lang.Exception getException()
Returns the embedded exception, if any.

Returns:
The embedded exception, or null if there is none.

getLocation

public EventLocation getLocation()
Returns the error location, if any.

Returns:
The error location, or null if there is none.

toString

public java.lang.String toString()
Override toString to pick up any embedded exception.

Overrides:
toString in class java.lang.Throwable
Returns:
A string representation of this exception.

Spatial DataBlade
JAVA API v8.21


Licensed Materials - Property of IBM
Copyright IBM Corp. 2002, 2012 All Rights Reserved.