1 package net.sourceforge.phpdt.internal.compiler.parser;
4 * Exception for a syntax error detected by the parser.
6 public class SyntaxError extends Error {
11 private static final long serialVersionUID = -8723926000065578914L;
13 /** The line where the error start */
16 /** The column where the error start */
19 /** the current line. */
22 /** The error message. */
26 * SyntaxError exception
29 * the line number where the error start
31 * the column where the error start
33 * the line where the error end
38 public SyntaxError(int lineNumber, int columnNumber, String currentLine,
40 this.lineNumber = lineNumber;
41 this.columnNumber = columnNumber;
42 this.currentLine = currentLine;
47 * Get the error message.
49 * @return the error message
51 public String getMessage() {
52 // StringBuffer buf = new StringBuffer(256);
53 // buf.append("Syntax error in line:");
54 // buf.append(lineNumber+1);
55 // buf.append(": "+ error + "\n");
56 // buf.append( currentLine + "\n");
57 // for (int i=0; i<(columnNumber-1); i++) {
61 // return buf.toString();
63 // System.err.println(currentLine);
64 // System.err.println(columnNumber);
69 * Get the line number where the error happens
71 * @return the line number
73 // public int getLine() {