Rakesh API

org.rakeshv.xml.addressbook
Class AddressException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.rakeshv.xml.addressbook.AddressException
All Implemented Interfaces:
java.io.Serializable

public class AddressException
extends java.lang.Exception

A custom exception that is used when any kind of exceptions are encountered when interacting with the JDOM package. Instances of this exception are also thrown, when implementation specific error conditions are encountered.

Copyright 2003 Rakesh Vidyadharan

Version:
$Id: AddressException.java,v 1.2 2004/05/26 11:42:39 rakesh Exp $
Author:
Rakesh Vidyadharan 2003 March 2
See Also:
Serialized Form

Field Summary
private  boolean critical
          A boolean field that indicates the criticality of the error.
private  java.lang.Throwable exception
          The exception that lead to this custom exception being thrown.
private  java.lang.String message
          The "friendly" error message that describes the error that was encountered.
 
Constructor Summary
AddressException(boolean critical, java.lang.String message)
          Create a new exception with the specified message.
AddressException(boolean critical, java.lang.String message, java.lang.Throwable exception)
          Create a new exception with the specified message and instance of Throwable that caused the problem.
 
Method Summary
 java.lang.Throwable getException()
          Return the value/reference of the exception.
 java.lang.String toString()
          Over-ridden form of the method inherited from the parent class.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, 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
 

Field Detail

critical

private boolean critical
A boolean field that indicates the criticality of the error. A value of true is used to indicate a critical error, while a value of false is used to indicate a non critical error.


message

private java.lang.String message
The "friendly" error message that describes the error that was encountered.


exception

private java.lang.Throwable exception
The exception that lead to this custom exception being thrown. This class maintains a reference to the root problem, as it will be easier to do global actions such as logging the exception in this class.

Constructor Detail

AddressException

public AddressException(boolean critical,
                        java.lang.String message)
Create a new exception with the specified message.

Parameters:
critical - - Use a value true to indicate that the error encountered was critical.
message - - The message that describes the problem.

AddressException

public AddressException(boolean critical,
                        java.lang.String message,
                        java.lang.Throwable exception)
Create a new exception with the specified message and instance of Throwable that caused the problem.

Parameters:
critical - - Use a value true to indicate that the error encountered was critical.
message - - The message that describes the problem.
exception - - The exception that caused this instance of the exception to be thrown.
Method Detail

toString

public java.lang.String toString()
Over-ridden form of the method inherited from the parent class. Just return the message value.

Overrides:
toString in class java.lang.Throwable
Returns:
String - The message value.

getException

public final java.lang.Throwable getException()
Return the value/reference of the exception.

Returns:
Throwable - The value/reference of exception.

Rakesh API

Copyright © 2002-2005 - Rakesh Vidyadharan