Skip to content

Commit

Permalink
As is, the informative error is being squashed for a less informative…
Browse files Browse the repository at this point in the history
… one. This small change adds the active record error info to the deserialization error.
  • Loading branch information
earnold committed Jan 19, 2012
1 parent bf83e26 commit 8d39077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/delayed/serialization/active_record.rb
Expand Up @@ -9,7 +9,7 @@ def self.yaml_new(klass, tag, val)
klass.with_exclusive_scope { klass.find(val['attributes'][klass.primary_key]) }
end
rescue ActiveRecord::RecordNotFound
raise Delayed::DeserializationError
raise Delayed::DeserializationError, "ActiveRecord::RecordNotFound, class: #{klass} , primary key: #{val['attributes'][klass.primary_key]} "
end

def to_yaml_properties
Expand Down

0 comments on commit 8d39077

Please sign in to comment.