All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jaregu.database.queries.compiling.expr.ExpressionEvalException Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.4.1
Show newest version
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;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy