com.jaregu.database.queries.compiling.expr.ExpressionEvalException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of queries Show documentation
Show all versions of queries Show documentation
Java based SQL templating project. Store your queries in *.sql files and build queries for execution. Supports simple expressions and conditional clauses and interface proxying for java-sql bridge.
package com.jaregu.database.queries.compiling.expr;
@SuppressWarnings("serial")
public class ExpressionEvalException extends ExpressionException {
final private String expression = EvaluationContext.peekCurrent().flatMap(EvaluationContext::getBaseExpression)
.map(Object::toString).orElse(null);
public ExpressionEvalException(Throwable cause) {
super(cause);
}
public ExpressionEvalException(String message) {
super(message);
}
public ExpressionEvalException(String message, Throwable cause) {
super(message, cause);
}
public String getExpression() {
return expression;
}
@Override
public String toString() {
String basicToString = super.toString();
if (expression != null)
return basicToString + " (expression: " + expression + ')';
else
return basicToString;
}
}