ExitStatusException (Apache Ant API)
Description: declaration: package: org.apache.tools.ant, class: ExitStatusException

# Class ExitStatusException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.tools.ant.BuildException
org.apache.tools.ant.ExitStatusException

All Implemented Interfaces:
  `Serializable`

public class ExitStatusException extends BuildException
BuildException + exit status.

Since:
  Ant 1.7
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExitStatusException(int status)`
  Constructs an `ExitStatusException`.
  `ExitStatusException(String msg, int status)`
  Constructs an `ExitStatusException`.
  `ExitStatusException(String message, int status, Location location)`
  Construct an exit status exception with location information too

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getStatus()`
  Get the status code.

  ### Methods inherited from class BuildException

  `getException, getLocation, of, setLocation, toString`
  Modifier and Type
  Method
  Description
  `Throwable`
  `getException()`
  Deprecated.
  Use `Throwable.getCause()` instead.
  `Location`
  `getLocation()`
  Returns the file location where the error occurred.
  `static BuildException`
  `of(Throwable t)`
  Get a `BuildException` for the specified `Throwable`.
  `void`
  `setLocation(Location location)`
  Sets the file location where the error occurred.
  `String`
  `toString()`
  Returns the location of the error and the error message.

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ExitStatusException

    public ExitStatusException(int status)
    Constructs an `ExitStatusException`.
    Parameters:
      `status` - the associated status code

  - ### ExitStatusException

    public ExitStatusException(String msg, int status)
    Constructs an `ExitStatusException`.
    Parameters:
      `msg` - the associated message
      `status` - the associated status code

  - ### ExitStatusException

    public ExitStatusException(String message, int status, Location location)
    Construct an exit status exception with location information too
    Parameters:
      `message` - error message
      `status` - exit status
      `location` - exit location

- ## Method Details

  - ### getStatus

    public int getStatus()
    Get the status code.
    Returns:
      `int`