3 * Copyright (C) 2000 Klaus Hartlage
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 package net.sourceforge.phpeclipse.phpeditor;
22 * Exception for a syntax error detected by the HartMath parser
25 public class SyntaxError extends Error {
32 * SyntaxError exception
37 public SyntaxError(int lineNumber, int columnNumber, String currentLine, String error) {
38 this.lineNumber = lineNumber;
39 this.columnNumber = columnNumber;
40 this.currentLine = currentLine;
44 public String getMessage() {
45 // StringBuffer buf = new StringBuffer(256);
46 // buf.append("Syntax error in line:");
47 // buf.append(lineNumber+1);
48 // buf.append(": "+ error + "\n");
49 // buf.append( currentLine + "\n");
50 // for (int i=0; i<(columnNumber-1); i++) {
54 // return buf.toString();
55 System.err.println(currentLine);
59 public int getLine() {