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
public class NGExitException
- extends SecurityException
Security exception which wraps an exit status code.
- Author:
- Pete Kirkham
- See Also:
- Serialized Form
Constructor Summary |
NGExitException(int status)
Constructs an exit exception. |
Method Summary |
int |
getStatus()
The status code returned by System.exit() |
void |
printStackTrace(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(PrintStream out)
|
NGExitException
public NGExitException(int status)
- Constructs an exit exception.
- Parameters:
status
- the status code returned via System.exit()
printStackTrace
public void printStackTrace(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 class Throwable
reallyPrintStackTrace
public void reallyPrintStackTrace(PrintStream out)
getStatus
public int getStatus()
- The status code returned by System.exit()
- Returns:
- the status code returned by System.exit()
Copyright © 2012. All Rights Reserved.