Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Only rescue ClassNotFoundExceptions when using JDBC drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrowning committed May 10, 2012
1 parent 3fb2883 commit 3859542
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion do_derby/lib/do_derby.rb
Expand Up @@ -12,7 +12,7 @@ module Derby

begin
java.lang.Thread.currentThread.getContextClassLoader().loadClass(DataObjects::Derby::JDBC_DRIVER, true)
rescue StandardError, java.lang.ClassNotFoundException
rescue java.lang.ClassNotFoundException
require 'jdbc/derby' # the JDBC driver, packaged as a gem
end

Expand Down
2 changes: 1 addition & 1 deletion do_h2/lib/do_h2.rb
Expand Up @@ -12,7 +12,7 @@ module H2

begin
java.lang.Thread.currentThread.getContextClassLoader().loadClass(DataObjects::H2::JDBC_DRIVER, true)
rescue StandardError, java.lang.ClassNotFoundException
rescue java.lang.ClassNotFoundException
require 'jdbc/h2' # the JDBC driver, packaged as a gem
end

Expand Down
2 changes: 1 addition & 1 deletion do_hsqldb/lib/do_hsqldb.rb
Expand Up @@ -12,7 +12,7 @@ module Hsqldb

begin
java.lang.Thread.currentThread.getContextClassLoader().loadClass(DataObjects::Hsqldb::JDBC_DRIVER, true)
rescue StandardError, java.lang.ClassNotFoundException
rescue java.lang.ClassNotFoundException
require 'jdbc/hsqldb' # the JDBC driver, packaged as a gem
end
require 'do_hsqldb/do_hsqldb' # the Java extension for this DO driver
Expand Down
2 changes: 1 addition & 1 deletion do_mysql/lib/do_mysql.rb
Expand Up @@ -11,7 +11,7 @@ module Mysql

begin
java.lang.Thread.currentThread.getContextClassLoader().loadClass(DataObjects::Mysql::JDBC_DRIVER, true)
rescue StandardError, java.lang.ClassNotFoundException
rescue java.lang.ClassNotFoundException
require 'jdbc/mysql' # the JDBC driver, packaged as a gem
end

Expand Down
2 changes: 1 addition & 1 deletion do_postgres/lib/do_postgres.rb
Expand Up @@ -11,7 +11,7 @@ module Postgres

begin
java.lang.Thread.currentThread.getContextClassLoader().loadClass(DataObjects::Postgres::JDBC_DRIVER, true)
rescue StandardError, java.lang.ClassNotFoundException
rescue java.lang.ClassNotFoundException
require 'jdbc/postgres' # the JDBC driver, packaged as a gem
end

Expand Down
2 changes: 1 addition & 1 deletion do_sqlite3/lib/do_sqlite3.rb
Expand Up @@ -11,7 +11,7 @@ module Sqlite3

begin
java.lang.Thread.currentThread.getContextClassLoader().loadClass(DataObjects::Sqlite3::JDBC_DRIVER, true)
rescue StandardError, java.lang.ClassNotFoundException
rescue java.lang.ClassNotFoundException
require 'jdbc/sqlite3' # the JDBC driver, packaged as a gem
end

Expand Down

0 comments on commit 3859542

Please sign in to comment.