improved mysql exception sorter

This commit is contained in:
wenshao
2014-12-07 19:17:28 +08:00
parent f17f6c976c
commit e0e851ac92
2 changed files with 7 additions and 1 deletions
@@ -24,12 +24,13 @@ public class MySqlExceptionSorter implements ExceptionSorter {
@Override
public boolean isExceptionFatal(SQLException e) {
String sqlState = e.getSQLState();
final String sqlState = e.getSQLState();
final int errorCode = e.getErrorCode();
if (sqlState != null && sqlState.startsWith("08")) {
return true;
}
switch (errorCode) {
// Communications Errors
case 1040: // ER_CON_COUNT_ERROR