Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve handling of LoadErrors with the oracle adapter. Closes #6780

…[kubo]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5956 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 8437be33801d598b3b3389163cb3082fb04b0ec8 1 parent 6d37c63
@NZKoz NZKoz authored
View
2  activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -265,7 +265,7 @@ def type_to_sql(type, limit = nil, precision = nil, scale = nil) #:nodoc:
column_type_sql << "(#{precision})"
end
else
- raise ArgumentError, "Error adding decimal column: precision cannot be empty if scale if specifed" if scale
+ raise ArgumentError, "Error adding decimal column: precision cannot be empty if scale if specified" if scale
end
column_type_sql
else
View
5 activerecord/lib/active_record/connection_adapters/oracle_adapter.rb
@@ -676,13 +676,14 @@ def exec(sql, *bindvars, &block)
# OCI8 driver is unavailable.
module ActiveRecord # :nodoc:
class Base
+ @@oracle_error_message = "Oracle/OCI libraries could not be loaded: #{$!.to_s}"
def self.oracle_connection(config) # :nodoc:
# Set up a reasonable error message
- raise LoadError, "Oracle/OCI libraries could not be loaded."
+ raise LoadError, @@oracle_error_message
end
def self.oci_connection(config) # :nodoc:
# Set up a reasonable error message
- raise LoadError, "Oracle/OCI libraries could not be loaded."
+ raise LoadError, @@oracle_error_message
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.