Coverage details for com.martiansoftware.nailgun.NGExitException

LineHitsSource
1 /*
2  
3   Copyright 2004, Martian Software, Inc.
4  
5   Licensed under the Apache License, Version 2.0 (the "License");
6   you may not use this file except in compliance with the License.
7   You may obtain a copy of the License at
8  
9   http://www.apache.org/licenses/LICENSE-2.0
10  
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16  
17 */
18  
19 package com.martiansoftware.nailgun;
20  
21 import java.io.PrintStream;
22  
23 import org.apache.tools.ant.ExitException;
24  
25 /**
26  * Security exception which wraps an exit status code.
27  * @author Pete Kirkham
28  */
29 public class NGExitException extends ExitException {
30         public NGExitException(int status) {
310                super(status);
320        }
33   
34         /**
35          * A lot of code out there, for example ant's Launcher,
36          * runs inside a try/catch (Throwable) which will squash
37          * this exception; most also calll printStackTrace(), so
38          * this re-throws the exception to escape the handling code.
39          */
40         public void printStackTrace (PrintStream out) {
410                throw this;
42         }
43         
44         public void reallyPrintStackTrace (PrintStream out) {
450                super.printStackTrace(out);
460        }
47 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.