|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| QedeqException.java | - | 100% | 100% | 100% |
|
||||||||||||||
| 1 | /* $Id: QedeqException.java,v 1.2 2007/12/21 23:33:47 m31 Exp $ | |
| 2 | * | |
| 3 | * This file is part of the project "Hilbert II" - http://www.qedeq.org | |
| 4 | * | |
| 5 | * Copyright 2000-2007, Michael Meyling <mime@qedeq.org>. | |
| 6 | * | |
| 7 | * "Hilbert II" is free software; you can redistribute | |
| 8 | * it and/or modify it under the terms of the GNU General Public | |
| 9 | * License as published by the Free Software Foundation; either | |
| 10 | * version 2 of the License, or (at your option) any later version. | |
| 11 | * | |
| 12 | * This program is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | */ | |
| 17 | ||
| 18 | package org.qedeq.kernel.common; | |
| 19 | ||
| 20 | ||
| 21 | /** | |
| 22 | * Base class for all exceptions of this application. | |
| 23 | * | |
| 24 | * @version $Revision: 1.2 $ | |
| 25 | * @author Michael Meyling | |
| 26 | */ | |
| 27 | public abstract class QedeqException extends Exception { | |
| 28 | ||
| 29 | /** Error code of this Exception. */ | |
| 30 | private final int errorCode; | |
| 31 | ||
| 32 | /** | |
| 33 | * Constructor. | |
| 34 | * | |
| 35 | * @param errorCode Error code of this message. | |
| 36 | * @param message Error message. | |
| 37 | * @param cause Detailed exception information. | |
| 38 | */ | |
| 39 | 73 | public QedeqException(final int errorCode, final String message, |
| 40 | final Throwable cause) { | |
| 41 | 73 | super(message, cause); |
| 42 | 73 | this.errorCode = errorCode; |
| 43 | } | |
| 44 | ||
| 45 | /** | |
| 46 | * Constructor. | |
| 47 | * | |
| 48 | * @param errorCode Error code of this message. | |
| 49 | * @param message Error message. | |
| 50 | */ | |
| 51 | 32164 | public QedeqException(final int errorCode, final String message) { |
| 52 | 32164 | super(message); |
| 53 | 32164 | this.errorCode = errorCode; |
| 54 | } | |
| 55 | ||
| 56 | /** | |
| 57 | * Get error code. | |
| 58 | * | |
| 59 | * @return Error code. | |
| 60 | */ | |
| 61 | 433 | public final int getErrorCode() { |
| 62 | 433 | return errorCode; |
| 63 | } | |
| 64 | ||
| 65 | } |
|
||||||||||