01: // kelondroOutOfLimitsException.java
02: // ---------------------------------
03: // part of The Kelondro Database
04: // (C) by Michael Peter Christen; mc@anomic.de
05: // first published on http://www.anomic.de
06: // Frankfurt, Germany, 2006
07: // created: 17.01.2006
08: //
09: // This program is free software; you can redistribute it and/or modify
10: // it under the terms of the GNU General Public License as published by
11: // the Free Software Foundation; either version 2 of the License, or
12: // (at your option) any later version.
13: //
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
17: // GNU General Public License for more details.
18: //
19: // You should have received a copy of the GNU General Public License
20: // along with this program; if not, write to the Free Software
21: // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22: //
23: // Using this software in any meaning (reading, learning, copying, compiling,
24: // running) means that you agree that the Author(s) is (are) not responsible
25: // for cost, loss of data or any harm that may be caused directly or indirectly
26: // by usage of this softare or this documentation. The usage of this software
27: // is on your own risk. The installation and usage (starting/running) of this
28: // software may allow other people or application to access your computer and
29: // any attached devices and is highly dependent on the configuration of the
30: // software which must be done by the user of the software; the author(s) is
31: // (are) also not responsible for proper configuration and usage of the
32: // software, even if provoked by documentation provided together with
33: // the software.
34: //
35: // Any changes to this file according to the GPL as documented in the file
36: // gpl.txt aside this file in the shipment you received can be done to the
37: // lines that follows this copyright notice here, but changes must not be
38: // done inside the copyright notive above. A re-distribution must contain
39: // the intact and unchanged copyright notice.
40: // Contributions and changes to the program code must be marked as such.
41:
42: package de.anomic.kelondro;
43:
44: public class kelondroOutOfLimitsException extends
45: java.lang.RuntimeException {
46:
47: private static final long serialVersionUID = 1L;
48:
49: public kelondroOutOfLimitsException() {
50: super ("unspecific-error");
51: }
52:
53: public kelondroOutOfLimitsException(int expectedLimit,
54: int actualSize) {
55: super ("Object size is " + actualSize
56: + "; it exceeds the size limit " + expectedLimit);
57: }
58:
59: public kelondroOutOfLimitsException(int actualSize) {
60: super ("Object size is " + actualSize + "; must not be negative");
61: }
62:
63: }
|