File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
lib/active_record/connection_adapters Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1+ ## v4.2.14
2+
3+ #### Fixed
4+
5+ * Fix rescue constants for optional connection gems. Fixes #475 .
6+
7+
18## v4.2.13
29
310#### Fixed
Original file line number Diff line number Diff line change 1- 4.2.13
1+ 4.2.14
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ def active?
133133 return false unless @connection
134134 raw_connection_do 'SELECT 1'
135135 true
136- rescue TinyTds :: Error , ODBC :: Error
136+ rescue * connection_errors
137137 false
138138 end
139139
@@ -307,6 +307,13 @@ def connect
307307 configure_connection
308308 end
309309
310+ def connection_errors
311+ @connection_errors ||= [ ] . tap do |errors |
312+ errors << TinyTds ::Error if defined? ( TinyTds ::Error )
313+ errors << ODBC ::Error if defined? ( ODBC ::Error )
314+ end
315+ end
316+
310317 def dblib_connect ( config )
311318 TinyTds ::Client . new (
312319 dataserver : config [ :dataserver ] ,
You can’t perform that action at this time.
0 commit comments