say I have the following
try{ //something }catch(Exception generic){ //catch all }catch(SpecificException se){ //catch specific exception only }
My proposition - catch SQLException and check code.
try { getConnectionSYS(dbConfigFile, properties); } catch (SQLException e){ if (e.getErrorCode()==1017){ getConnectionUSER(dbConfigFile, properties); } else { throw e; } }