net.sf.japaki.text
Class FormatException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.sf.japaki.text.FormatException
All Implemented Interfaces:
Serializable

public class FormatException
extends Exception

Indicates an exception while formatting an object with a parser. It stores the path to the field where the parsing exception occurred.

See Also:
Serialized Form

Constructor Summary
FormatException(Collection<Parser> path)
          Constructs a format exception with the specified details.
FormatException(String s, Collection<Parser> path)
          Constructs a format exception with the specified details.
FormatException(String message, Throwable cause, Collection<Parser> path)
          Constructs a format exception with the specified details.
FormatException(Throwable cause, Collection<Parser> path)
          Constructs a format exception with the specified details.
 
Method Summary
 Collection<Parser> getPath()
          Returns the path to the field where the format exception occurred.
 
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(Collection<Parser> path)
Constructs a format exception with the specified details.

Parameters:
path - path to the field where the exception is found

FormatException

public FormatException(String s,
                       Collection<Parser> path)
Constructs a format exception with the specified details.

Parameters:
s - the detail message, see Throwable for details.
path - path to the field where the exception is found

FormatException

public FormatException(Throwable cause,
                       Collection<Parser> path)
Constructs a format exception with the specified details.

Parameters:
cause - cause, see Throwable for details.
path - path to the field where the exception is found

FormatException

public FormatException(String message,
                       Throwable cause,
                       Collection<Parser> path)
Constructs a format exception with the specified details.

Parameters:
message - the detail message
cause - cause, see Throwable for details.
path - path to the field where the exception is found
Method Detail

getPath

public Collection<Parser> getPath()
Returns the path to the field where the format exception occurred.

Returns:
the path to the field where the format exception occurred