You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "TaoZex (via GitHub)" <gi...@apache.org> on 2023/03/19 05:23:30 UTC

[GitHub] [incubator-seatunnel] TaoZex commented on a diff in pull request #4364: [Feature][Connector-V2][Kafka]Kafka source supports data deserializat…

TaoZex commented on code in PR #4364:
URL: https://github.com/apache/incubator-seatunnel/pull/4364#discussion_r1141260382


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/serialization/DeserializationSchema.java:
##########
@@ -35,9 +35,13 @@
     T deserialize(byte[] message) throws IOException;
 
     default void deserialize(byte[] message, Collector<T> out) throws IOException {
-        T deserialize = deserialize(message);
-        if (deserialize != null) {
-            out.collect(deserialize);
+        try {
+            T deserialize = deserialize(message);
+            if (deserialize != null) {
+                out.collect(deserialize);
+            }
+        } catch (Exception e) {
+            throw new IOException(e);

Review Comment:
   Please unify exception



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org