mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-09-27 17:14:03 +08:00
update exception
This commit is contained in:
@ -84,24 +84,16 @@ public class IDriverManager {
|
||||
driverEntry = getJDBCDriver(driver);
|
||||
}
|
||||
try {
|
||||
Connection con = driverEntry.getDriver().connect(url, info);
|
||||
if (con != null) {
|
||||
return con;
|
||||
}
|
||||
return driverEntry.getDriver().connect(url, info);
|
||||
} catch (SQLException var7) {
|
||||
Connection con = tryConnectionAgain(driverEntry, url, info);
|
||||
if (con != null) {
|
||||
return con;
|
||||
} else {
|
||||
throw var7;
|
||||
throw new SQLException("Cannot create connection (" + var7.getMessage() + ")", "08001",
|
||||
var7);
|
||||
}
|
||||
}
|
||||
|
||||
if (reason != null) {
|
||||
throw reason;
|
||||
} else {
|
||||
throw new SQLException("No suitable driver found for " + url, "08001");
|
||||
}
|
||||
}
|
||||
|
||||
private static Connection tryConnectionAgain(DriverEntry driverEntry, String url,
|
||||
|
Reference in New Issue
Block a user