ic4y commented on code in PR #3598:
URL:
https://github.com/apache/incubator-seatunnel/pull/3598#discussion_r1035583149
##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/JdbcInputFormat.java:
##########
@@ -95,9 +98,9 @@ public void openInputFormat() {
statement = jdbcDialect.creatPreparedStatement(dbConn,
queryTemplate, fetchSize);
} catch (SQLException se) {
- throw new IllegalArgumentException("open() failed." +
se.getMessage(), se);
+ throw new
JdbcConnectorException(CommonErrorCode.READER_OPERATION_FAILED, "open()
failed." + se.getMessage(), se);
Review Comment:
ok
##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkWriter.java:
##########
@@ -85,7 +88,7 @@ public Optional<XidInfo> prepareCommit()
connectionProvider.getConnection().commit();
}
} catch (SQLException e) {
- throw new IOException(e);
+ new JdbcConnectorException(JdbcConnectorErrorCode.EXCEPTION, e);
Review Comment:
Yes, and then add commit failure related info
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]