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.parser;
12:
13: /** This class represents an error of a parser.
14: *
15: * @author Hubert Schmid
16: */
17:
18: public final class ParserException extends Exception {
19:
20: /* --- constructors --- */
21:
22: /** @param message The error message. The message may be shown to
23: * the user and should be appropriately formated.
24: * @param location The location on which the error occured. The
25: * location may be null, if the location is unknown or the error
26: * is independent of a location. */
27: public ParserException(String message, Location location) {
28: super (message);
29: this .location = location;
30: }
31:
32: /* --- methods --- */
33:
34: /** @return The location may be null. */
35: public Location getLocation() {
36: return location;
37: }
38:
39: /* --- fields --- */
40:
41: private final Location location;
42:
43: }
|