ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
@Override public String getMessage() { // The superclass' message is the textual context information // for this exception, so we add in the underlying cause to the message return super.getMessage() + ": " + getCause().getMessage(); } }
@Override public String getMessage() { // The superclass' message is the textual context information // for this exception, so we add in the underlying cause to the message return super.getMessage() + ": " + getCause().getMessage(); } }
/** * Creates a new ValidateErrorInfo with an CalciteContextException. * * @param e Exception */ public ValidateErrorInfo( CalciteContextException e) { this.startLineNum = e.getPosLine(); this.startColumnNum = e.getPosColumn(); this.endLineNum = e.getEndPosLine(); this.endColumnNum = e.getEndPosColumn(); this.errorMsg = e.getCause().getMessage(); }
/** * Creates a new ValidateErrorInfo with an CalciteContextException. * * @param e Exception */ public ValidateErrorInfo( CalciteContextException e) { this.startLineNum = e.getPosLine(); this.startColumnNum = e.getPosColumn(); this.endLineNum = e.getEndPosLine(); this.endColumnNum = e.getEndPosColumn(); this.errorMsg = e.getCause().getMessage(); }
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
public static UserException.Builder validationError(String query, ValidationException ex) { Throwable cause = ex; if (ex.getCause() != null) { // ValidationException generally wraps the "real" cause that we are interested in cause = ex.getCause(); } UserException.Builder b = UserException.validationError(cause) .addContext(SQL_QUERY_CONTEXT, query); // CalciteContextException alters the error message including the start/end positions // we need to extract the original error message and add the remaining information as context if (cause instanceof CalciteContextException && cause.getCause() != null) { CalciteContextException cce = (CalciteContextException) cause; b.message(cce.getCause().getMessage()) .addContext(START_LINE_CONTEXT, cce.getPosLine()) .addContext(START_COLUMN_CONTEXT, cce.getPosColumn()) .addContext(END_LINE_CONTEXT, cce.getEndPosLine()) .addContext(END_COLUMN_CONTEXT, cce.getEndPosColumn()); } return b; }
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();
ece.getEndPosLine(), ece.getEndPosColumn()); ex = ece.getCause();