fixed issue #280 , refactor MysqlQueryExecutor use IOException

This commit is contained in:
agapple
2017-03-17 19:40:12 +08:00
parent 19a56fb77e
commit 20d8ac67dc
2 changed files with 4 additions and 4 deletions

View File

@@ -24,9 +24,9 @@ public class MysqlQueryExecutor {
private SocketChannel channel; private SocketChannel channel;
public MysqlQueryExecutor(MysqlConnector connector){ public MysqlQueryExecutor(MysqlConnector connector) throws IOException{
if (!connector.isConnected()) { if (!connector.isConnected()) {
throw new RuntimeException("should execute connector.connect() first"); throw new IOException("should execute connector.connect() first");
} }
this.channel = connector.getChannel(); this.channel = connector.getChannel();

View File

@@ -23,9 +23,9 @@ public class MysqlUpdateExecutor {
private SocketChannel channel; private SocketChannel channel;
public MysqlUpdateExecutor(MysqlConnector connector){ public MysqlUpdateExecutor(MysqlConnector connector) throws IOException{
if (!connector.isConnected()) { if (!connector.isConnected()) {
throw new RuntimeException("should execute connector.connect() first"); throw new IOException("should execute connector.connect() first");
} }
this.channel = connector.getChannel(); this.channel = connector.getChannel();