com.izforge.izpack.compiler
Class CompilerException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended bycom.izforge.izpack.compiler.CompilerException
All Implemented Interfaces:
java.io.Serializable

public class CompilerException
extends java.io.IOException

Indicates a Failure to compile.

Author:
Marcus Stursberg
See Also:
Serialized Form

Field Summary
private  java.lang.Throwable _cause
          The throwable that caused this throwable to get thrown, or null if this throwable was not caused by another throwable, or if the causative throwable is unknown.
(package private) static long serialVersionUID
           
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
CompilerException(java.lang.String message)
          Construct a new exception with the specified message.
CompilerException(java.lang.String message, java.lang.Throwable cause)
          Construct a new exception with the specified message and wraps another cause.
 
Method Summary
 java.lang.Throwable getCause()
          Returns the cause of this throwable or null if the cause is nonexistent or unknown.
 java.lang.Throwable initCause(java.lang.Throwable cause)
          Initializes the cause of this throwable to the specified value.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

_cause

private java.lang.Throwable _cause
The throwable that caused this throwable to get thrown, or null if this throwable was not caused by another throwable, or if the causative throwable is unknown. If this field is equal to this throwable itself, it indicates that the cause of this throwable has not yet been initialized.

Constructor Detail

CompilerException

public CompilerException(java.lang.String message)
Construct a new exception with the specified message.

Parameters:
message - Description of the error

CompilerException

public CompilerException(java.lang.String message,
                         java.lang.Throwable cause)
Construct a new exception with the specified message and wraps another cause.

Parameters:
message - Description of the error
cause - Throwable
Method Detail

initCause

public java.lang.Throwable initCause(java.lang.Throwable cause)
Initializes the cause of this throwable to the specified value. (The cause is the throwable that caused this throwable to get thrown.)

This method can be called at most once. It is generally called from within the constructor, or immediately after creating the throwable. If this throwable was created with CompilerException(String,Throwable), this method cannot be called even once.

Parameters:
cause - the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Returns:
a reference to this Throwable instance.
Throws:
java.lang.IllegalArgumentException - if cause is this throwable. (A throwable cannot be its own cause.)
java.lang.IllegalStateException - if this throwable was created with CompilerException(String,Throwable), or this method has already been called on this throwable.

getCause

public java.lang.Throwable getCause()
Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the initCause(Throwable) method. While it is typically unnecessary to override this method, a subclass can override it to return a cause set by some other means. This is appropriate for a "legacy chained throwable" that predates the addition of chained exceptions to Throwable. Note that it is not necessary to override any of the PrintStackTrace methods, all of which invoke the getCause method to determine the cause of a throwable.

Returns:
the cause of this throwable or null if the cause is nonexistent or unknown.