Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined method error on exception #20848

Conversation

deivid-rodriguez
Copy link
Contributor

The error method is not defined, in general, for exceptions. Instead,
print the exception message. This error was hiding actual meaningful DB
configuration errors. See http://stackoverflow.com/questions/18774463.

The `error` method is not defined, in general, for exceptions. Instead,
print the exception message. This error was hiding actual meaningful DB
configuration errors. See http://stackoverflow.com/questions/18774463.
@deivid-rodriguez deivid-rodriguez force-pushed the fix_undefined_method_error_on_exception branch from 50cfa9a to f48dc78 Compare July 11, 2015 18:53
@meinac
Copy link
Contributor

meinac commented Jul 12, 2015

@deivid-rodriguez I'm looking at the ArJdbcMySQL::Error class and I can see that error method is defined. Here it is.

@deivid-rodriguez
Copy link
Contributor Author

Then I guess that file is somehow not properly required because the error message is pretty clear... :)

undefined method `error' for #<ActiveRecord::JDBCError:0x109d7b8>

arthurnn pushed a commit that referenced this pull request Sep 15, 2015
…error_on_exception

Fix undefined method error on exception
@arthurnn arthurnn merged commit 03e8bcc into rails:master Sep 15, 2015
@arthurnn
Copy link
Member

thanks

@deivid-rodriguez deivid-rodriguez deleted the fix_undefined_method_error_on_exception branch September 15, 2015 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants