From 20d8ac67dc04e9e0c4484af769b156bcd75ef00b Mon Sep 17 00:00:00 2001 From: agapple Date: Fri, 17 Mar 2017 19:40:12 +0800 Subject: [PATCH] fixed issue #280 , refactor MysqlQueryExecutor use IOException --- .../otter/canal/parse/driver/mysql/MysqlQueryExecutor.java | 4 ++-- .../otter/canal/parse/driver/mysql/MysqlUpdateExecutor.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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();