org.objectweb.fractal.adl
Class ParserException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.objectweb.fractal.adl.ParserException
All Implemented Interfaces:
Serializable

public class ParserException
extends Exception

Thrown when loading, parsing, checking or constructing a type or a template definition.

See Also:
Serialized Form

Constructor Summary
ParserException(String src, int line, String msg, Throwable exception)
          Constructs a new ParserException.
ParserException(String msg, Throwable exception)
          Constructs a new ParserException.
ParserException(XMLElement src, ParserException exception)
          Constructs a new ParserException.
ParserException(XMLElement src, String msg, Throwable exception)
          Constructs a new ParserException.
 
Method Summary
 Throwable getException()
          Returns the exception that is wrapped in this exception.
 int getLine()
          Returns the line number in getSource where this exception occured.
 String getSource()
          Returns the name of the file where this exception occured.
 void printStackTrace()
          Prints the stack backtrace.
 void printStackTrace(PrintStream s)
          Prints this exception and its backtrace to the specified print stream.
 void printStackTrace(PrintWriter s)
          Prints this exception and its backtrace to the specified print writer.
 String toString()
          Returns a String representation of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParserException

public ParserException(String src,
                       int line,
                       String msg,
                       Throwable exception)
Constructs a new ParserException.

Parameters:
src - the file where this exception occured. May be null.
line - the line number where this exception occured.
msg - a detail error message.
exception - a wrapped exception. May be null.

ParserException

public ParserException(XMLElement src,
                       String msg,
                       Throwable exception)
Constructs a new ParserException.

Parameters:
src - the XML element where this exception occured.
msg - a detail error message.
exception - a wrapped exception. May be null.

ParserException

public ParserException(XMLElement src,
                       ParserException exception)
Constructs a new ParserException.

Parameters:
src - the XML element where this exception occured.
exception - a wrapped parser exception.

ParserException

public ParserException(String msg,
                       Throwable exception)
Constructs a new ParserException.

Parameters:
msg - a detail error message.
exception - a wrapped exception. May be null.
Method Detail

getSource

public String getSource()
Returns the name of the file where this exception occured.

Returns:
the name of the file where this exception occured. May be null.

getLine

public int getLine()
Returns the line number in getSource where this exception occured.

Returns:
the line number in getSource where this exception occured.

getException

public Throwable getException()
Returns the exception that is wrapped in this exception.

Returns:
the exception wrapped in this exception. May be null.

toString

public String toString()
Returns a String representation of this exception.

Returns:
a String representation of this exception.

printStackTrace

public void printStackTrace()
Prints the stack backtrace.


printStackTrace

public void printStackTrace(PrintStream s)
Prints this exception and its backtrace to the specified print stream.

Parameters:
s - PrintStream to use for output.

printStackTrace

public void printStackTrace(PrintWriter s)
Prints this exception and its backtrace to the specified print writer.

Parameters:
s - PrintWriter to use for output.