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: package de.uka.ilkd.key.java;
11:
12: public class ConvertException extends RuntimeException {
13:
14: recoder.parser.ParseException pe = null;
15:
16: de.uka.ilkd.key.parser.proofjava.ParseException pje;
17:
18: public ConvertException(String errmsg) {
19: super ("" + errmsg);
20: }
21:
22: public ConvertException(recoder.parser.ParseException pe) {
23: this .pe = pe;
24: }
25:
26: public ConvertException(
27: de.uka.ilkd.key.parser.proofjava.ParseException pe) {
28: this .pje = pe;
29: }
30:
31: public recoder.parser.ParseException parseException() {
32: return pe;
33: }
34:
35: public de.uka.ilkd.key.parser.proofjava.ParseException proofJavaException() {
36: return pje;
37: }
38:
39: public String getMessage() {
40: if (pe != null)
41: return pe.getMessage();
42: if (pje != null)
43: return pje.getMessage();
44: return super.getMessage();
45: }
46:
47: }
|