play.template2.exceptions.GTCompilationExceptionWithSourceInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastergt Show documentation
Show all versions of fastergt Show documentation
RePlay is a fork of the Play1 framework, made and maintained by Codeborne.
The newest version!
package play.template2.exceptions;
import play.template2.GTTemplateLocation;
public class GTCompilationExceptionWithSourceInfo extends GTCompilationException {
public final String specialMessage;
public final GTTemplateLocation templateLocation;
public final int oneBasedLineNo;
public GTCompilationExceptionWithSourceInfo(String specialMessage, GTTemplateLocation templateLocation, int oneBasedLineNo) {
this.specialMessage = specialMessage;
this.templateLocation = templateLocation;
this.oneBasedLineNo = oneBasedLineNo;
}
public GTCompilationExceptionWithSourceInfo(String specialMessage, GTTemplateLocation templateLocation, int oneBasedLineNo, Throwable throwable) {
super(throwable);
this.specialMessage = specialMessage;
this.templateLocation = templateLocation;
this.oneBasedLineNo = oneBasedLineNo;
}
@Override
public String getMessage() {
return String.format("CompilationError: %s. Template %s:%d", specialMessage, templateLocation.relativePath, oneBasedLineNo);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy