use of org.dbflute.helper.token.line.LineToken in project dbflute-core by dbflute.
the class DfAbstractReplaceSchemaProcess method extractDetailMessageList.
// ===================================================================================
// Final Info
// ==========
protected List<String> extractDetailMessageList(DfSqlFileFireResult fireResult) {
final List<String> detailMessageList = new ArrayList<String>();
final String detailMessage = fireResult.getDetailMessage();
if (detailMessage != null && detailMessage.trim().length() > 0) {
final LineToken lineToken = new LineToken();
final List<String> tokenizedList = lineToken.tokenize(detailMessage, op -> op.delimitateBy(ln()));
for (String tokenizedElement : tokenizedList) {
detailMessageList.add(tokenizedElement);
}
}
return detailMessageList;
}
use of org.dbflute.helper.token.line.LineToken in project dbflute-core by dbflute.
the class DfAbstractRepsProcess method extractDetailMessageList.
// ===================================================================================
// Final Info
// ==========
protected List<String> extractDetailMessageList(DfSqlFileFireResult fireResult) {
final List<String> detailMessageList = new ArrayList<String>();
final String detailMessage = fireResult.getDetailMessage();
if (detailMessage != null && detailMessage.trim().length() > 0) {
final LineToken lineToken = new LineToken();
final List<String> tokenizedList = lineToken.tokenize(detailMessage, op -> op.delimitateBy(ln()));
for (String tokenizedElement : tokenizedList) {
detailMessageList.add(tokenizedElement);
}
}
return detailMessageList;
}
use of org.dbflute.helper.token.line.LineToken in project dbflute-core by dbflute.
the class DfSqlFileFireMan method doBuildErrorContinuedMessage.
protected void doBuildErrorContinuedMessage(StringBuilder sb, List<ErrorContinuedSql> errorContinuedSqlList) {
for (ErrorContinuedSql errorContinuedSql : errorContinuedSqlList) {
final String sql = errorContinuedSql.getSql();
sb.append(ln()).append(sql);
final SQLException sqlEx = errorContinuedSql.getSqlEx();
String message = sqlEx.getMessage();
if (sqlEx != null && message != null) {
message = message.trim();
final LineToken lineToken = new LineToken();
final List<String> tokenizedList = lineToken.tokenize(message, op -> op.delimitateBy(ln()));
int elementIndex = 0;
for (String element : tokenizedList) {
if (elementIndex == 0) {
sb.append(ln()).append(" >> ").append(element);
} else {
sb.append(ln()).append(" ").append(element);
}
++elementIndex;
}
if (isShowSQLState(sqlEx)) {
sb.append(ln());
sb.append(" (SQLState=").append(sqlEx.getSQLState());
sb.append(" ErrorCode=").append(sqlEx.getErrorCode()).append(")");
}
}
}
}
Aggregations