diff --git a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlQueryExecutor.java b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlQueryExecutor.java index 22853292..3a79ad2a 100644 --- a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlQueryExecutor.java +++ b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlQueryExecutor.java @@ -24,9 +24,9 @@ public class MysqlQueryExecutor { private SocketChannel channel; - public MysqlQueryExecutor(MysqlConnector connector){ + public MysqlQueryExecutor(MysqlConnector connector) throws IOException{ if (!connector.isConnected()) { - throw new RuntimeException("should execute connector.connect() first"); + throw new IOException("should execute connector.connect() first"); } this.channel = connector.getChannel(); diff --git a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlUpdateExecutor.java b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlUpdateExecutor.java index 0b6c11c4..f2f072cb 100644 --- a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlUpdateExecutor.java +++ b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlUpdateExecutor.java @@ -23,9 +23,9 @@ public class MysqlUpdateExecutor { private SocketChannel channel; - public MysqlUpdateExecutor(MysqlConnector connector){ + public MysqlUpdateExecutor(MysqlConnector connector) throws IOException{ if (!connector.isConnected()) { - throw new RuntimeException("should execute connector.connect() first"); + throw new IOException("should execute connector.connect() first"); } this.channel = connector.getChannel();