Search in sources :

Example 1 with IfCommentListIndexOutOfBoundsException

use of org.dbflute.twowaysql.exception.IfCommentListIndexOutOfBoundsException in project dbflute-core by dbflute.

the class IfCommentEvaluator method throwIfCommentListIndexOutOfBoundsException.

protected void throwIfCommentListIndexOutOfBoundsException(List<?> list, String numberIndex, IndexOutOfBoundsException e) {
    final ExceptionMessageBuilder br = createExceptionMessageBuilder();
    br.addNotice("The list index on the IF comment was out of bounds!");
    br.addItem("Advice");
    br.addElement("Please confirm the index on your comment.");
    br.addItem("IF Comment");
    br.addElement(_expression);
    br.addItem("Target List");
    br.addElement(list);
    br.addItem("OutOfBounds Index");
    br.addElement(numberIndex);
    br.addItem("IndexOutOfBoundsException");
    br.addElement(e.getMessage());
    br.addItem("Specified ParameterBean");
    br.addElement(getDisplayParameterBean());
    br.addItem("Specified SQL");
    br.addElement(_specifiedSql);
    final String msg = br.buildExceptionMessage();
    throw new IfCommentListIndexOutOfBoundsException(msg, e);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) IfCommentListIndexOutOfBoundsException(org.dbflute.twowaysql.exception.IfCommentListIndexOutOfBoundsException)

Aggregations

ExceptionMessageBuilder (org.dbflute.helper.message.ExceptionMessageBuilder)1 IfCommentListIndexOutOfBoundsException (org.dbflute.twowaysql.exception.IfCommentListIndexOutOfBoundsException)1