01: // @(#)$Id: JMLMapException.java 1.1 Mon, 02 May 2005 14:31:03 +0200 engelc $
02:
03: // Copyright (C) 1998, 1999 Iowa State University
04:
05: // This file is part of JML
06:
07: // JML is free software; you can redistribute it and/or modify
08: // it under the terms of the GNU General Public License as published by
09: // the Free Software Foundation; either version 2, or (at your option)
10: // any later version.
11:
12: // JML 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: // You should have received a copy of the GNU General Public License
18: // along with JML; see the file COPYING. If not, write to
19: // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20:
21: package org.jmlspecs.models;
22:
23: /** Exceptions from JML Map types that indicate that the argument was
24: * illegal for this operation.
25: *
26: * @version $Revision: 1.1 $
27: * @author Gary T. Leavens
28: */
29: //-@ immutable
30: //@ pure
31: public class JMLMapException extends IllegalArgumentException {
32:
33: /** The value associated with this exception.
34: */
35: public final JMLType val_;
36:
37: /** Initialize this object with the given detail string.
38: */
39: public JMLMapException() {
40: super ("finite map error");
41: val_ = null;
42: }
43:
44: /** Initialize this object with the given detail string.
45: */
46: public JMLMapException(String m) {
47: super (m);
48: val_ = null;
49: }
50:
51: /** Initialize this object with the given detail string.
52: */
53: public JMLMapException(String m, JMLType errval) {
54: super(m);
55: val_ = errval;
56: }
57: }
|