Currently when there is connection issue, the connection exception will be captured and logged. And usually that will incur another exception:
java.lang.NullPointerException: Cannot invoke "java.sql.Connection.setAutoCommit(boolean)" because "conn" is null
which is less useful than the original exception.
Although the exception is logged by Migratus through slf4j, these days there are devs who does not (or cannot) provide slf4j backend for various reasons.
This PR
Re-throw exceptions so library user can properly & freely handle it.
Background
Currently when there is connection issue, the connection exception will be captured and logged. And usually that will incur another exception:
which is less useful than the original exception.
Although the exception is logged by Migratus through
slf4j
, these days there are devs who does not (or cannot) provideslf4j
backend for various reasons.This PR
Re-throw exceptions so library user can properly & freely handle it.