org.apache.tools.ant
public class BuildException extends RuntimeException
Constructor Summary | |
---|---|
BuildException()
Constructs a build exception with no descriptive information. | |
BuildException(String message)
Constructs an exception with the given descriptive message.
| |
BuildException(String message, Throwable cause)
Constructs an exception with the given message and exception as
a root cause.
| |
BuildException(String msg, Throwable cause, Location location)
Constructs an exception with the given message and exception as
a root cause and a location in a file.
| |
BuildException(Throwable cause)
Constructs an exception with the given exception as a root cause.
| |
BuildException(String message, Location location)
Constructs an exception with the given descriptive message and a
location in a file.
| |
BuildException(Throwable cause, Location location)
Constructs an exception with the given exception as
a root cause and a location in a file.
|
Method Summary | |
---|---|
Throwable | getCause()
Returns the nested exception, if any.
|
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(PrintStream ps)
Prints the stack trace of this exception and any nested
exception to the specified PrintStream.
|
void | printStackTrace(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.
|
String | toString()
Returns the location of the error and the error message.
|
Parameters: message A description of or information about the exception.
Should not be null
.
Parameters: 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
.
Parameters: 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
.
Parameters: cause The exception that might have caused this one.
Should not be null
.
Parameters: 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
.
Parameters: 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
.
Returns: the nested exception, or null
if no
exception is associated with this one
Returns: the nested exception, or null
if no
exception is associated with this one
Returns: the file location where the error occurred.
System.err
.Parameters: ps The PrintStream to print the stack trace to.
Must not be null
.
Parameters: pw The PrintWriter to print the stack trace to.
Must not be null
.
Parameters: location The file location where the error occurred.
Must not be null
.
Returns: the location of the error and the error message