This is an automated email from the ASF dual-hosted git repository.
fanjia pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new 38646b11b [Feature][Connector-jdbc] Fix JDBC Connector Throw Exception
Error. (#3796)
38646b11b is described below
commit 38646b11b8211e4a2645b380cf490ff3fc341e27
Author: Guangdong Liu <[email protected]>
AuthorDate: Sat Dec 24 14:26:43 2022 +0800
[Feature][Connector-jdbc] Fix JDBC Connector Throw Exception Error. (#3796)
---
.../seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkWriter.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkWriter.java
b/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkWriter.java
index 86c1d86eb..b3a809e2d 100644
---
a/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkWriter.java
+++
b/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkWriter.java
@@ -88,7 +88,7 @@ public class JdbcSinkWriter implements
SinkWriter<SeaTunnelRow, XidInfo, JdbcSin
connectionProvider.getConnection().commit();
}
} catch (SQLException e) {
- new
JdbcConnectorException(JdbcConnectorErrorCode.TRANSACTION_OPERATION_FAILED,
"commit failed," + e.getMessage(), e);
+ throw new
JdbcConnectorException(JdbcConnectorErrorCode.TRANSACTION_OPERATION_FAILED,
"commit failed," + e.getMessage(), e);
}
return Optional.empty();
}
@@ -108,7 +108,7 @@ public class JdbcSinkWriter implements
SinkWriter<SeaTunnelRow, XidInfo, JdbcSin
connectionProvider.getConnection().commit();
}
} catch (SQLException e) {
- new
JdbcConnectorException(CommonErrorCode.WRITER_OPERATION_FAILED, "unable to
close JDBC sink write", e);
+ throw new
JdbcConnectorException(CommonErrorCode.WRITER_OPERATION_FAILED, "unable to
close JDBC sink write", e);
}
outputFormat.close();
}