|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| ParserException.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 | /* $Id: ParserException.java,v 1.2 2006/10/20 20:23:05 m31 Exp $ | |
| 2 | * | |
| 3 | * This file is part of the project "Hilbert II" - http://www.qedeq.org | |
| 4 | * | |
| 5 | * Copyright 2000-2006, Michael Meyling <mime@qedeq.org>. | |
| 6 | * | |
| 7 | * "Hilbert II" is free software; you can redistribute | |
| 8 | * it and/or modify it under the terms of the GNU General Public | |
| 9 | * License as published by the Free Software Foundation; either | |
| 10 | * version 2 of the License, or (at your option) any later version. | |
| 11 | * | |
| 12 | * This program 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 | ||
| 18 | package org.qedeq.kernel.parser; | |
| 19 | ||
| 20 | /** | |
| 21 | * Base for parser exceptions. | |
| 22 | * | |
| 23 | * @version $Revision: 1.2 $ | |
| 24 | * @author Michael Meyling | |
| 25 | */ | |
| 26 | public abstract class ParserException extends Exception { | |
| 27 | ||
| 28 | /** Error position within input. */ | |
| 29 | private long position; | |
| 30 | ||
| 31 | /** | |
| 32 | * Constructor. | |
| 33 | * | |
| 34 | * @param position Error position within input. | |
| 35 | * @param message Error message. | |
| 36 | */ | |
| 37 | 0 | public ParserException(final long position, final String message) { |
| 38 | 0 | super(message); |
| 39 | 0 | this.position = position; |
| 40 | } | |
| 41 | ||
| 42 | /** | |
| 43 | * Get error position. | |
| 44 | * | |
| 45 | * @return Error position. | |
| 46 | */ | |
| 47 | 0 | public final long getPosition() { |
| 48 | 0 | return position; |
| 49 | } | |
| 50 | ||
| 51 | } |
|
||||||||||