如何让 Flyway 输出 java 迁移器中发生的异常的堆栈跟踪?
显然我不能。
private Pair<Boolean, MigrationVersion> applyMigration(final ResolvedMigration migration, boolean isOutOfOrder) throws FlywayException {
...
} catch (Exception e) {
LOG.error(e.toString());
@SuppressWarnings({"ThrowableResultOfMethodCallIgnored"})
Throwable rootCause = ExceptionUtils.getRootCause(e);
if (rootCause != null) {
LOG.error("Caused by " + rootCause.toString());
}
}
堆栈跟踪被吞没,这使得异常行号等重要信息消失。
有没有改变这种行为的计划?