28 lines
530 B
Java
Executable File
28 lines
530 B
Java
Executable File
package error;
|
|
|
|
public class Error {
|
|
private int line;
|
|
private ErrorType type;
|
|
|
|
public Error(int line, ErrorType type) {
|
|
this.line = line;
|
|
this.type = type;
|
|
}
|
|
|
|
public void printError() {
|
|
System.out.println(this.line + " " + this.type);
|
|
}
|
|
|
|
public int getLine() {
|
|
return this.line;
|
|
}
|
|
|
|
public ErrorType getType() {
|
|
return this.type;
|
|
}
|
|
|
|
public String toString() {
|
|
return this.line + " " + this.type + "\n";
|
|
}
|
|
}
|