org.codehaus.backport175.compiler
Class CompilerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.codehaus.backport175.compiler.CompilerException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ParseException, SourceParseException

public class CompilerException
extends java.lang.RuntimeException

Thrown when error in compilation of the annotations. Those errors should interrupts the compilation.

Author:
Jonas Bon?r
See Also:
Serialized Form

Field Summary
protected  java.lang.Throwable m_originalException
          Original exception which caused this exception.
protected  SourceLocation m_sourceLocation
          Optional location hint
 
Constructor Summary
CompilerException(java.lang.String message)
          Sets the message for the exception.
CompilerException(java.lang.String message, SourceLocation sourceLocation)
          Sets the message and location for the exception.
CompilerException(java.lang.String message, java.lang.Throwable throwable)
          Sets the message for the exception and the original exception being wrapped.
 
Method Summary
 SourceLocation getLocation()
          Returns the source location for the exception.
 void printStackTrace()
          Print the full stack trace, including the original exception.
 void printStackTrace(java.io.PrintStream ps)
          Print the full stack trace, including the original exception.
 void printStackTrace(java.io.PrintWriter pw)
          Print the full stack trace, including the original exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_originalException

protected java.lang.Throwable m_originalException
Original exception which caused this exception.


m_sourceLocation

protected SourceLocation m_sourceLocation
Optional location hint

Constructor Detail

CompilerException

public CompilerException(java.lang.String message)
Sets the message for the exception.

Parameters:
message - the message

CompilerException

public CompilerException(java.lang.String message,
                         SourceLocation sourceLocation)
Sets the message and location for the exception.

Parameters:
message - the message
sourceLocation -

CompilerException

public CompilerException(java.lang.String message,
                         java.lang.Throwable throwable)
Sets the message for the exception and the original exception being wrapped.

Parameters:
message - the detail of the error message
throwable - the original exception
Method Detail

printStackTrace

public void printStackTrace()
Print the full stack trace, including the original exception.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Print the full stack trace, including the original exception.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
ps - the byte stream in which to print the stack trace

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Print the full stack trace, including the original exception.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
pw - the character stream in which to print the stack trace

getLocation

public SourceLocation getLocation()
Returns the source location for the exception.

Returns: