mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-19 23:00:19 +00:00
refactor ParseException
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.dfsek.terra.addons.terrascript.api;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.api.Position;
|
||||
|
||||
public class ParseException extends Exception {
|
||||
private static final long serialVersionUID = 6744390543046766386L;
|
||||
private final Position position;
|
||||
|
||||
public ParseException(String message, Position position) {
|
||||
super(message);
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public ParseException(String message, Position position, Throwable cause) {
|
||||
super(message, cause);
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return super.getMessage() + ": " + position;
|
||||
}
|
||||
|
||||
public Position getPosition() {
|
||||
return position;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user