|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--java.lang.RuntimeException | +--org.apache.tools.ant.BuildException
Signals an error condition during a build
Constructor Summary | |
BuildException()
Constructs a build exception with no descriptive information. |
|
BuildException(java.lang.String message)
Constructs an exception with the given descriptive message. |
|
BuildException(java.lang.String message,
Location location)
Constructs an exception with the given descriptive message and a location in a file. |
|
BuildException(java.lang.String message,
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 |
getCause()
Returns the nested exception, if any. |
java.lang.Throwable |
getException()
Returns the nested exception, if any. |
Location |
getLocation()
Returns the file location where the error occurred. |
void |
printStackTrace()
Prints the stack trace for this exception and any nested exception to System.err . |
void |
printStackTrace(java.io.PrintStream ps)
Prints the stack trace of this exception and any nested exception to the specified PrintStream. |
void |
printStackTrace(java.io.PrintWriter pw)
Prints the stack trace of this exception and any nested exception to the specified PrintWriter. |
void |
setLocation(Location location)
Sets the file location where the error occurred. |
java.lang.String |
toString()
Returns the location of the error and the error message. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BuildException()
public BuildException(java.lang.String message)
message
- A description of or information about the exception.
Should not be null
.public BuildException(java.lang.String message, java.lang.Throwable cause)
message
- A description of or information about the exception.
Should not be null
unless a cause is specified.cause
- The exception that might have caused this one.
May be null
.public BuildException(java.lang.String msg, java.lang.Throwable cause, Location location)
msg
- A description of or information about the exception.
Should not be null
unless a cause is specified.cause
- The exception that might have caused this one.
May be null
.location
- The location in the project file where the error
occurred. Must not be null
.public BuildException(java.lang.Throwable cause)
cause
- The exception that might have caused this one.
Should not be null
.public BuildException(java.lang.String message, Location location)
message
- A description of or information about the exception.
Should not be null
.location
- The location in the project file where the error
occurred. Must not be null
.public BuildException(java.lang.Throwable cause, Location location)
cause
- The exception that might have caused this one.
Should not be null
.location
- The location in the project file where the error
occurred. Must not be null
.Method Detail |
public java.lang.Throwable getException()
null
if no
exception is associated with this onepublic java.lang.Throwable getCause()
getCause
in class java.lang.Throwable
null
if no
exception is associated with this onepublic java.lang.String toString()
toString
in class java.lang.Throwable
public void setLocation(Location location)
location
- The file location where the error occurred.
Must not be null
.public Location getLocation()
public void printStackTrace()
System.err
.
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream ps)
printStackTrace
in class java.lang.Throwable
ps
- The PrintStream to print the stack trace to.
Must not be null
.public void printStackTrace(java.io.PrintWriter pw)
printStackTrace
in class java.lang.Throwable
pw
- The PrintWriter to print the stack trace to.
Must not be null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |