{"action":"created","issue":{"url":"https://api.github.com/repos/spree/spree/issues/6049","labels_url":"https://api.github.com/repos/spree/spree/issues/6049/labels{/name}","comments_url":"https://api.github.com/repos/spree/spree/issues/6049/comments","events_url":"https://api.github.com/repos/spree/spree/issues/6049/events","html_url":"https://github.com/spree/spree/pull/6049","id":57822106,"number":6049,"title":"remove rescues that just re-raise the error","user":{"login":"BenMorganIO","id":3117356,"avatar_url":"https://avatars.githubusercontent.com/u/3117356?v=3","gravatar_id":"","url":"https://api.github.com/users/BenMorganIO","html_url":"https://github.com/BenMorganIO","followers_url":"https://api.github.com/users/BenMorganIO/followers","following_url":"https://api.github.com/users/BenMorganIO/following{/other_user}","gists_url":"https://api.github.com/users/BenMorganIO/gists{/gist_id}","starred_url":"https://api.github.com/users/BenMorganIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenMorganIO/subscriptions","organizations_url":"https://api.github.com/users/BenMorganIO/orgs","repos_url":"https://api.github.com/users/BenMorganIO/repos","events_url":"https://api.github.com/users/BenMorganIO/events{/privacy}","received_events_url":"https://api.github.com/users/BenMorganIO/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"peterberkenbosch","id":4252,"avatar_url":"https://avatars.githubusercontent.com/u/4252?v=3","gravatar_id":"","url":"https://api.github.com/users/peterberkenbosch","html_url":"https://github.com/peterberkenbosch","followers_url":"https://api.github.com/users/peterberkenbosch/followers","following_url":"https://api.github.com/users/peterberkenbosch/following{/other_user}","gists_url":"https://api.github.com/users/peterberkenbosch/gists{/gist_id}","starred_url":"https://api.github.com/users/peterberkenbosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterberkenbosch/subscriptions","organizations_url":"https://api.github.com/users/peterberkenbosch/orgs","repos_url":"https://api.github.com/users/peterberkenbosch/repos","events_url":"https://api.github.com/users/peterberkenbosch/events{/privacy}","received_events_url":"https://api.github.com/users/peterberkenbosch/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-02-16T16:08:46Z","updated_at":"2015-02-18T18:33:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/6049","html_url":"https://github.com/spree/spree/pull/6049","diff_url":"https://github.com/spree/spree/pull/6049.diff","patch_url":"https://github.com/spree/spree/pull/6049.patch"},"body":"I've been working with with `Spree::Core::Importer::Order` lately and the amount of exception handling has led to some painful debugging. I didn't really understand why the `rescue`s were being called in a large amount of the methods. It was simply capturing a highly detailed ruby message, and then reraising a message that wasn't so helpful. When I submitting a poor payment, the error message was:\r\n\r\n```ruby\r\n2.2.0 :131 > order_importer.create_payments_from_params params, order\r\nRuntimeError: Order import payments: no implicit conversion of Symbol into Integer [:amount, #<BigDecimal:7fdfbc9d54d8,'0.16E2',9(18)>]\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/bundler/gems/spree-47d064d3faa3/core/lib/spree/core/importer/order.rb:199:in `rescue in block in create_payments_from_params'\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/bundler/gems/spree-47d064d3faa3/core/lib/spree/core/importer/order.rb:189:in `block in create_payments_from_params'\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/bundler/gems/spree-47d064d3faa3/core/lib/spree/core/importer/order.rb:188:in `each'\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/bundler/gems/spree-47d064d3faa3/core/lib/spree/core/importer/order.rb:188:in `create_payments_from_params'\r\n\tfrom (irb):131\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/console.rb:110:in `start'\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/console.rb:9:in `start'\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/gems/zeus-0.15.4/lib/zeus/rails.rb:136:in `console'\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/gems/zeus-0.15.4/lib/zeus.rb:148:in `block in command'\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/gems/zeus-0.15.4/lib/zeus.rb:135:in `fork'\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/gems/zeus-0.15.4/lib/zeus.rb:135:in `command'\r\n\tfrom /Users/benmorgan/.rvm/gems/ruby-2.2.0/gems/zeus-0.15.4/lib/zeus.rb:50:in `go'\r\n\tfrom -e:1:in `<main>'\r\n```\r\n\r\nWhat line did this error occur on? 199 is where the `raise` was and 189 is where the `begin` was. `raise` also adds a lot of overheard in a ruby program. Usually adding a toll to the performance.\r\n\r\nThis PR removes an anti-patten from Spree."},"comment":{"url":"https://api.github.com/repos/spree/spree/issues/comments/74919920","html_url":"https://github.com/spree/spree/pull/6049#issuecomment-74919920","issue_url":"https://api.github.com/repos/spree/spree/issues/6049","id":74919920,"user":{"login":"BenMorganIO","id":3117356,"avatar_url":"https://avatars.githubusercontent.com/u/3117356?v=3","gravatar_id":"","url":"https://api.github.com/users/BenMorganIO","html_url":"https://github.com/BenMorganIO","followers_url":"https://api.github.com/users/BenMorganIO/followers","following_url":"https://api.github.com/users/BenMorganIO/following{/other_user}","gists_url":"https://api.github.com/users/BenMorganIO/gists{/gist_id}","starred_url":"https://api.github.com/users/BenMorganIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenMorganIO/subscriptions","organizations_url":"https://api.github.com/users/BenMorganIO/orgs","repos_url":"https://api.github.com/users/BenMorganIO/repos","events_url":"https://api.github.com/users/BenMorganIO/events{/privacy}","received_events_url":"https://api.github.com/users/BenMorganIO/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T18:33:59Z","updated_at":"2015-02-18T18:33:59Z","body":"I like backtraces..."}}