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: package de.uka.ilkd.key.parser.ocl;
09:
10: import de.uka.ilkd.key.speclang.SLTranslationError;
11:
12: public class OCLTranslationError extends antlr.RecognitionException {
13:
14: String message = "";
15:
16: public OCLTranslationError(String msg) {
17: super (msg);
18: this .message = msg;
19: }
20:
21: public OCLTranslationError(String msg, int line, int col) {
22: super (msg, "", line, col);
23: this .message = msg;
24: }
25:
26: public String getMessage() {
27: return this .message;
28: }
29:
30: public SLTranslationError getSLTranslationError() {
31: SLTranslationError result = new SLTranslationError(message,
32: getLine(), getColumn());
33: result.setStackTrace(getStackTrace());
34: return result;
35: }
36: }
|