use of org.dbflute.exception.DfProcedureListGettingFailureException in project dbflute-core by dbflute.
the class DfProcedureExtractor method throwProcedureListGettingFailureException.
protected void throwProcedureListGettingFailureException(UnifiedSchema unifiedSchema, String procedureName, Exception e) throws SQLException {
final boolean forSqlEx = e instanceof SQLException;
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("Failed to get a list of procedures.");
br.addItem("Unified Schema");
br.addElement(unifiedSchema);
br.addItem("Current Procedure");
br.addElement(procedureName);
br.addItem(forSqlEx ? "Caused SQLException" : "Unexpected Exception");
br.addElement(e.getClass().getName());
br.addElement(e.getMessage());
final String msg = br.buildExceptionMessage();
if (forSqlEx) {
throw new DfJDBCException(msg, (SQLException) e);
} else {
throw new DfProcedureListGettingFailureException(msg, e);
}
}
Aggregations