Created
August 4, 2019 21:35
-
-
Save coleman-rik/94e76cb62f7890a5fd3039004958971d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Connection getConnectionFromURL(String url) | |
throws SQLCoreException | |
{ | |
Connection conn; | |
Debugger.outW("\n getting connection for:" + url); | |
DataSource ds = DataSourceFactoryImpl.getInstance().getDataSource(url); | |
conn = ds.getConnection(); | |
if(conn == null) | |
throw new SQLCoreException("\n Couldn't get connection (null) for:" + url); | |
if(conn.isClosed()) | |
throw new SQLCoreException("\n Couldn't get connection (closed) for:" + url); | |
return conn; | |
Exception e1; | |
e1; // <- This throws Syntax error, insert "VariableDeclarators" to complete LocalVariableDeclaration in eclipse | |
throw new SQLCoreException(e1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment