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:
java.io.Serializable
public class NGExitException extends java.lang.SecurityException
Security exception which wraps an exit status code.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private int
status
Status code
-
Constructor Summary
Constructors Constructor Description NGExitException(int status)
Constructs an exit exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getStatus()
The status code returned by System.exit()void
printStackTrace(java.io.PrintStream out)
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
reallyPrintStackTrace(java.io.PrintStream out)
-
-
-
Method Detail
-
printStackTrace
public void printStackTrace(java.io.PrintStream out)
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 classjava.lang.Throwable
-
reallyPrintStackTrace
public void reallyPrintStackTrace(java.io.PrintStream out)
-
getStatus
public int getStatus()
The status code returned by System.exit()- Returns:
- the status code returned by System.exit()
-
-