|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| IllegalDataException.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 | /* $Id: IllegalDataException.java,v 1.4 2006/10/20 20:23:00 m31 Exp $ | |
| 2 | * | |
| 3 | * This file is part of the project "Hilbert II" - http://www.qedeq.org | |
| 4 | * | |
| 5 | * Copyright 2000-2006, 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.bo.module; | |
| 19 | ||
| 20 | ||
| 21 | /** | |
| 22 | * Data validation error. Occurs if a set or add method leads to wrong or inconsistent data. | |
| 23 | * | |
| 24 | * @version $Revision: 1.4 $ | |
| 25 | * @author Michael Meyling | |
| 26 | */ | |
| 27 | public abstract class IllegalDataException 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 | */ | |
| 38 | 0 | public IllegalDataException(final int errorCode, final String message) { |
| 39 | 0 | super(message); |
| 40 | 0 | this.errorCode = errorCode; |
| 41 | } | |
| 42 | ||
| 43 | /** | |
| 44 | * Get error code. | |
| 45 | * | |
| 46 | * @return Error code. | |
| 47 | */ | |
| 48 | 0 | public int getErrorCode() { |
| 49 | 0 | return errorCode; |
| 50 | } | |
| 51 | ||
| 52 | } |
|
||||||||||