org.apache.tools.ant
Class BuildException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.apache.tools.ant.BuildException
All Implemented Interfaces:
java.io.Serializable

public class BuildException
extends java.lang.RuntimeException

Signals an error condition during a build.

Author:
James Duncan Davidson
See Also:
Serialized Form

Constructor Summary
BuildException()
          Constructs a build exception with no descriptive information.
BuildException(java.lang.String msg)
          Constructs an exception with the given descriptive message.
BuildException(java.lang.String msg, Location location)
          Constructs an exception with the given descriptive message and a location in a file.
BuildException(java.lang.String msg, java.lang.Throwable cause)
          Constructs an exception with the given message and exception as a root cause.
BuildException(java.lang.String msg, java.lang.Throwable cause, Location location)
          Constructs an exception with the given message and exception as a root cause and a location in a file.
BuildException(java.lang.Throwable cause)
          Constructs an exception with the given exception as a root cause.
BuildException(java.lang.Throwable cause, Location location)
          Constructs an exception with the given exception as a root cause and a location in a file.
 
Method Summary
 java.lang.Throwable getException()
          Returns the nested exception.
 Location getLocation()
          Returns the file location where the error occured.
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream ps)
           
 void printStackTrace(java.io.PrintWriter pw)
           
 void setLocation(Location location)
          Sets the file location where the error occured.
 java.lang.String toString()
          Returns the location of the error and the error message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BuildException

public BuildException()
Constructs a build exception with no descriptive information.

BuildException

public BuildException(java.lang.String msg)
Constructs an exception with the given descriptive message.
Parameters:
msg - Description of or information about the exception.

BuildException

public BuildException(java.lang.String msg,
                      java.lang.Throwable cause)
Constructs an exception with the given message and exception as a root cause.
Parameters:
msg - Description of or information about the exception.
cause - Throwable that might have cause this one.

BuildException

public BuildException(java.lang.String msg,
                      java.lang.Throwable cause,
                      Location location)
Constructs an exception with the given message and exception as a root cause and a location in a file.
Parameters:
msg - Description of or information about the exception.
cause - Exception that might have cause this one.
location - Location in the project file where the error occured.

BuildException

public BuildException(java.lang.Throwable cause)
Constructs an exception with the given exception as a root cause.
Parameters:
cause - Exception that might have caused this one.

BuildException

public BuildException(java.lang.String msg,
                      Location location)
Constructs an exception with the given descriptive message and a location in a file.
Parameters:
msg - Description of or information about the exception.
location - Location in the project file where the error occured.

BuildException

public BuildException(java.lang.Throwable cause,
                      Location location)
Constructs an exception with the given exception as a root cause and a location in a file.
Parameters:
cause - Exception that might have cause this one.
location - Location in the project file where the error occured.
Method Detail

getException

public java.lang.Throwable getException()
Returns the nested exception.

toString

public java.lang.String toString()
Returns the location of the error and the error message.
Overrides:
toString in class java.lang.Throwable

setLocation

public void setLocation(Location location)
Sets the file location where the error occured.

getLocation

public Location getLocation()
Returns the file location where the error occured.

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Overrides:
printStackTrace in class java.lang.Throwable


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.