Package com.martiansoftware.nailgun
Class NGExitException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.SecurityException
com.martiansoftware.nailgun.NGExitException
- All Implemented Interfaces:
Serializable
Security exception which wraps an exit status code.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
The status code returned by System.exit()void
A lot of code out there, for example ant's Launcher, runs inside a try/catch (Throwable) which will squash this exception; most also calll printStackTrace(), so this re-throws the exception to escape the handling code.void
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
status
private int statusStatus code
-
-
Constructor Details
-
NGExitException
public NGExitException(int status) Constructs an exit exception.- Parameters:
status
- the status code returned via System.exit()
-
-
Method Details
-
printStackTrace
A lot of code out there, for example ant's Launcher, runs inside a try/catch (Throwable) which will squash this exception; most also calll printStackTrace(), so this re-throws the exception to escape the handling code.- Overrides:
printStackTrace
in classThrowable
-
reallyPrintStackTrace
-
getStatus
public int getStatus()The status code returned by System.exit()- Returns:
- the status code returned by System.exit()
-