org.xins.common.text
Class FormatException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.xins.common.text.FormatException
All Implemented Interfaces:
Serializable

public final class FormatException
extends RuntimeException

Exception thrown if a character string does not match a certain format.

Since:
XINS 1.0.0
Version:
$Revision: 1.11 $ $Date: 2006/08/28 09:12:31 $
Author:
Ernst de Haan
See Also:
Serialized Form

Constructor Summary
FormatException(String string, String reason)
          Constructs a FormatException.
 
Method Summary
 String getReason()
          Returns the reason.
 String getString()
          Returns the string that is considered invalid.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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

FormatException

public FormatException(String string,
                       String reason)
                throws IllegalArgumentException
Constructs a FormatException.

Parameters:
string - the character string that mismatches the format, cannot be null.
reason - description of the problem, can be null.
Throws:
IllegalArgumentException - if s == null.
Method Detail

getString

public String getString()
Returns the string that is considered invalid.

Returns:
the string that is considered invalid, cannot be null.

getReason

public String getReason()
Returns the reason.

Returns:
the reason for the string to be considered invalid, can be null.


See http://www.xins.org/.