Source code: com/eireneh/util/LogicError.java
1
2 package com.eireneh.util;
3
4 /**
5 * LogicError is an unchecked Exception that tells us something went
6 * unexpectedly wrong - something that logic says cant happen.
7 *
8 * <table border='1' cellPadding='3' cellSpacing='0' width="100%">
9 * <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
10 * Distribution Licence:<br />
11 * Project B is free software; you can redistribute it
12 * and/or modify it under the terms of the GNU General Public License,
13 * version 2 as published by the Free Software Foundation.<br />
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.<br />
18 * The License is available on the internet
19 * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
20 * <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
21 * MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
22 * The copyright to this program is held by it's authors.
23 * </font></td></tr></table>
24 * @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
25 * @see docs.Licence
26 * @author Joe Walker
27 * @version D0.I0.T0
28 */
29 public class LogicError extends RuntimeException
30 {
31 /**
32 * Logic Errors should never happen so there is no need for an error
33 * message as a description describes how this happened.
34 */
35 public LogicError()
36 {
37 this.ex = null;
38 }
39
40 /**
41 * Logic Errors should never happen. This passes on the presumably
42 * checked Exception
43 */
44 public LogicError(Throwable ex)
45 {
46 this.ex = ex;
47 }
48
49 /** The error that caused this exception */
50 private Throwable ex;
51 }