Skip to content

Commit

Permalink
test not throw RuntimeException $527
Browse files Browse the repository at this point in the history
  • Loading branch information
yanhuqing666 committed May 9, 2018
1 parent 2e01ce6 commit 0c2eb61
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -105,7 +105,7 @@ public boolean testConnection(String schema) throws IOException {
if (bin1.getData()[0] == ErrorPacket.FIELD_COUNT) {
ErrorPacket err = new ErrorPacket();
err.read(bin1);
throw new RuntimeException(new String(err.getMessage(), StandardCharsets.UTF_8));
throw new IOException(new String(err.getMessage(), StandardCharsets.UTF_8));
}
HandshakeV10Packet handshake = new HandshakeV10Packet();
handshake.read(bin1);
Expand All @@ -122,7 +122,7 @@ public boolean testConnection(String schema) throws IOException {
try {
authPacket.setPassword(passwd(this.getConfig().getPassword(), handshake));
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e.getMessage());
throw new IOException(e.getMessage());
}
authPacket.setDatabase(schema);
authPacket.write(out);
Expand Down

0 comments on commit 0c2eb61

Please sign in to comment.