use of org.dbflute.twowaysql.exception.BindVariableCommentListIndexOutOfBoundsException in project dbflute-core by dbflute.
the class BoundValueTracer method throwListIndexOutOfBoundsException.
protected void throwListIndexOutOfBoundsException(String numberIndex, IndexOutOfBoundsException e) {
final ExceptionMessageBuilder br = createExceptionMessageBuilder();
br.addNotice("The list index on the " + _commentType.textName() + " was out of bounds.");
br.addItem("Advice");
br.addElement("Please confirm the index on your comment.");
br.addItem(_commentType.titleName());
br.addElement(_expression);
br.addItem("OutOfBounds Index");
br.addElement(numberIndex);
br.addItem("IndexOutOfBoundsException");
br.addElement(e.getMessage());
br.addItem("Specified SQL");
br.addElement(_specifiedSql);
final String msg = br.buildExceptionMessage();
if (ParameterCommentType.BIND.equals(_commentType)) {
throw new BindVariableCommentListIndexOutOfBoundsException(msg, e);
} else if (ParameterCommentType.EMBEDDED.equals(_commentType)) {
throw new EmbeddedVariableCommentListIndexOutOfBoundsException(msg, e);
} else if (ParameterCommentType.FORCOMMENT.equals(_commentType)) {
throw new ForCommentListIndexOutOfBoundsException(msg, e);
} else {
// no way
throw new BindVariableCommentListIndexOutOfBoundsException(msg, e);
}
}
Aggregations