1 package net.sourceforge.phpdt.internal.compiler.parser;
4 * Exception for a syntax error detected by the parser.
6 public class SyntaxError extends Error {
8 /** The line where the error start */
11 /** The column where the error start */
14 /** the current line. */
17 /** The error message. */
21 * SyntaxError exception
24 * the line number where the error start
26 * the column where the error start
28 * the line where the error end
33 public SyntaxError(int lineNumber, int columnNumber, String currentLine,
35 this.lineNumber = lineNumber;
36 this.columnNumber = columnNumber;
37 this.currentLine = currentLine;
42 * Get the error message.
44 * @return the error message
46 public String getMessage() {
47 // StringBuffer buf = new StringBuffer(256);
48 // buf.append("Syntax error in line:");
49 // buf.append(lineNumber+1);
50 // buf.append(": "+ error + "\n");
51 // buf.append( currentLine + "\n");
52 // for (int i=0; i<(columnNumber-1); i++) {
56 // return buf.toString();
58 // System.err.println(currentLine);
59 // System.err.println(columnNumber);
64 * Get the line number where the error happens
66 * @return the line number
68 public int getLine() {