|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ExitException.java | - | 66.7% | 50% | 60% |
|
1 |
package junit.extensions.jfcunit;
|
|
2 |
|
|
3 |
|
|
4 |
/**
|
|
5 |
* Used to report exit status of classes which call System.exit().
|
|
6 |
*
|
|
7 |
* @author <a href="mailto:vraravam@thoughtworks.com">Vijay Aravamudhan : ThoughtWorks Inc.</a>
|
|
8 |
*/
|
|
9 |
public final class ExitException extends SecurityException { |
|
10 |
/**
|
|
11 |
* Status code.
|
|
12 |
*/
|
|
13 |
private final int m_status; |
|
14 |
|
|
15 |
/**
|
|
16 |
* Constructs an exit exception.
|
|
17 |
*
|
|
18 |
* @param status the status code returned via System.exit()
|
|
19 |
*/
|
|
20 | 1 |
public ExitException(final int status) { |
21 | 1 |
super("ExitException: status " + status); |
22 | 1 |
m_status = status; |
23 |
} |
|
24 |
|
|
25 |
/**
|
|
26 |
* The status code returned by System.exit().
|
|
27 |
*
|
|
28 |
* @return the status code returned by System.exit()
|
|
29 |
*/
|
|
30 | 0 |
public int getStatus() { |
31 | 0 |
return m_status;
|
32 |
} |
|
33 |
} |
|
34 |
|
|