01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10:
11: package de.uka.ilkd.key.proof;
12:
13: import de.uka.ilkd.key.logic.sort.Sort;
14:
15: public class SortMismatchException extends
16: SVInstantiationExceptionWithPosition {
17:
18: private String toInstantiate;
19: private Sort givenSort;
20:
21: public SortMismatchException(String toInstantiate, Sort givenSort,
22: int row, int column) {
23: super ("Sorts mismatch", row, column, false);
24: this .toInstantiate = toInstantiate;
25: this .givenSort = givenSort;
26: }
27:
28: public String getMessage() {
29: String errmsg = super .getMessage();
30: errmsg += "\n Sort of instantiation given for " + toInstantiate
31: + ", " + givenSort + ", is illegal at this place.";
32: return errmsg;
33: }
34:
35: /**
36: * Returns a string representation of this exception.
37: */
38: public String toString() {
39: return getMessage();
40: }
41: }
|