| 1 | /* |
| 2 | * Copyright (C) 2006 Steve Ratcliffe |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * |
| 14 | * Author: Steve Ratcliffe |
| 15 | * Create date: 20-Dec-2006 |
| 16 | */ |
| 17 | package uk.me.parabola.imgfmt; |
| 18 | |
| 19 | /** |
| 20 | * Used to exit the program. So that System.exit need only be called |
| 21 | * in the one place, or indeed not at all. |
| 22 | * |
| 23 | * @author Steve Ratcliffe |
| 24 | */ |
| 25 | public class ExitException extends RuntimeException { |
| 26 | |
| 27 | |
| 28 | /** |
| 29 | * Constructs a new runtime exception with the specified detail message. |
| 30 | * The cause is not initialized, and may subsequently be initialized by a |
| 31 | * call to {@link #initCause}. |
| 32 | * |
| 33 | * @param message the detail message. The detail message is saved for |
| 34 | * later retrieval by the {@link #getMessage()} method. |
| 35 | */ |
| 36 | public ExitException(String message) { |
| 37 | super(message); |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Constructs a new runtime exception with the specified detail message and |
| 42 | * cause. <p>Note that the detail message associated with |
| 43 | * <code>cause</code> is <i>not</i> automatically incorporated in |
| 44 | * this runtime exception's detail message. |
| 45 | * |
| 46 | * @param message the detail message (which is saved for later retrieval |
| 47 | * by the {@link #getMessage()} method). |
| 48 | * @param cause the cause (which is saved for later retrieval by the |
| 49 | * {@link #getCause()} method). (A <tt>null</tt> value is |
| 50 | * permitted, and indicates that the cause is nonexistent or |
| 51 | * unknown.) |
| 52 | * @since 1.4 |
| 53 | */ |
| 54 | public ExitException(String message, Throwable cause) { |
| 55 | super(message, cause); |
| 56 | } |
| 57 | } |