Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

keep the original exception's backtrace #35

Open
wants to merge 1 commit into
base: 2-3-github
Choose a base branch
from

Conversation

technoweenie
Copy link

The StatementInvalid exception keeps the original exception's message, but not the backtrace. So, we end up getting a message and backtrace like:

ArgumentError: wrong number of arguments (1 for 2)

.../vendor/gems/1.9.3/ruby/1.9.1/gems/activerecord-2.3.14.github25/lib/active_record/connection_adapters/abstract_adapter.rb:228:in `rescue in log'
.../vendor/gems/1.9.3/ruby/1.9.1/gems/activerecord-2.3.14.github25/lib/active_record/connection_adapters/abstract_adapter.rb:205:in `log'

I want to know where that ArgumentError came from.

We don't care about a backtrace pointing to #log
@mtodd
Copy link
Member

mtodd commented Jan 8, 2014

:shipit:

@haileys
Copy link

haileys commented Jan 8, 2014

Seems legit. In Ruby 2.1 we might even be able to use the new exception cause stuff for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants