org.codehaus.dna
Class ConfigurationException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.codehaus.dna.ConfigurationException
All Implemented Interfaces:
java.io.Serializable

public class ConfigurationException
extends java.lang.Exception

The ConfigurationException is used to signal a problem with the configuration object. The configuration object may have malformed data (ie expected an integer but got a string), have missing data (ie no attribute with specified name) or may fail to be valid via some other mechanism.

Version:
$Revision: 1.2 $ $Date: 2004/05/01 09:51:48 $
See Also:
Serialized Form

Constructor Summary
ConfigurationException(java.lang.String message, java.lang.String path, java.lang.String location)
          Create configuration exception with specified message, path and location.
ConfigurationException(java.lang.String message, java.lang.String path, java.lang.String location, java.lang.Throwable cause)
          Create configuration exception with specified message, path, location and cause.
ConfigurationException(java.lang.String message, java.lang.Throwable cause)
          Create configuration exception with specified message and cause.
 
Method Summary
 java.lang.Throwable getCause()
          Return the exception that caused this exception if any.
 java.lang.String getLocation()
          Return a string describing the location of the configuration element that caused the exception.
 java.lang.String getPath()
          The xpath to the configuration element that caused the exception.
 java.lang.String toString()
          Return the string representation of exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigurationException

public ConfigurationException(java.lang.String message,
                              java.lang.String path,
                              java.lang.String location)
Create configuration exception with specified message, path and location.

Parameters:
message - the message
path - the path
location - the location

ConfigurationException

public ConfigurationException(java.lang.String message,
                              java.lang.Throwable cause)
Create configuration exception with specified message and cause.

Parameters:
message - the message
cause - the cause

ConfigurationException

public ConfigurationException(java.lang.String message,
                              java.lang.String path,
                              java.lang.String location,
                              java.lang.Throwable cause)
Create configuration exception with specified message, path, location and cause.

Parameters:
message - the message
path - the path
location - the location
cause - the cause
Method Detail

getPath

public java.lang.String getPath()
The xpath to the configuration element that caused the exception. This may be null or empty if not relevent or not known.

Returns:
the xpath to element that caused exception

getLocation

public java.lang.String getLocation()
Return a string describing the location of the configuration element that caused the exception. This may be null or empty if not relevent or not known. The location is usally formatted according to uri[:line number[:column number]]. Note that the line and column numbers may not be present.

Returns:
the location where exception occured

getCause

public java.lang.Throwable getCause()
Return the exception that caused this exception if any.

Returns:
the exception that caused this exception if any.

toString

public java.lang.String toString()
Return the string representation of exception.

Returns:
the string representation of exception.


Copyright © 2003-2004 Codehaus. All Rights Reserved.