diff options
author | Tom Tromey <tromey@redhat.com> | 2003-04-19 21:17:50 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2003-04-19 21:17:50 +0000 |
commit | a8ada98685bc94b7bbde2865fd685464a18d160d (patch) | |
tree | 4fc13305f425cea754f23403e6595e5a31598e3d /libjava/java/sql/DriverManager.java | |
parent | de0656cf30b171cf5a05d2233e4aab26edc56105 (diff) | |
download | gcc-a8ada98685bc94b7bbde2865fd685464a18d160d.zip gcc-a8ada98685bc94b7bbde2865fd685464a18d160d.tar.gz gcc-a8ada98685bc94b7bbde2865fd685464a18d160d.tar.bz2 |
Date.java, [...]: New versions from Classpath.
* java/sql/Date.java, java/sql/DriverManager.java,
java/sql/Time.java, java/sql/Timestamp.java: New versions from
Classpath.
From-SVN: r65831
Diffstat (limited to 'libjava/java/sql/DriverManager.java')
-rw-r--r-- | libjava/java/sql/DriverManager.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libjava/java/sql/DriverManager.java b/libjava/java/sql/DriverManager.java index 229450a..649c5ae7 100644 --- a/libjava/java/sql/DriverManager.java +++ b/libjava/java/sql/DriverManager.java @@ -1,5 +1,5 @@ /* DriverManager.java -- Manage JDBC drivers - Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -103,7 +103,10 @@ public class DriverManager { Class.forName(driver_classname); // The driver registers itself } - catch (Exception e) { ; } // Ignore not founds + catch (Exception e) + { + // Ignore not founds + } } } @@ -209,9 +212,9 @@ public class DriverManager * @param url The JDBC URL string to find a driver for. * * @return A <code>Driver</code> that can connect to the specified - * URL, or <code>null</code> if a suitable driver cannot be found. + * URL. * - * @exception SQLException If an error occurs. + * @exception SQLException If an error occurs, or no suitable driver can be found. */ public static Driver getDriver(String url) throws SQLException { @@ -224,7 +227,7 @@ public class DriverManager return d; } - return null; + throw new SQLException("No driver found for " + url); } /** |