It would be useful to inspect the record in question every time an
ActiveRecord exception is raised. This is currently possible with some
(ActiveRecord::RecordNotSaved for instance), but not others. Any idea what
the rationale for this selection is? I initially thought that you can query
the exception for the record as long as it exists (or existed), but
ActiveRecord::RecordNotSaved refutes that assumption, because you could be
creating it for the first time.
The goal from such a proposal would be generic error collecting. For
instance rescuing from all descendants of ActiveRecordError and passing the
record id to Sentry, if it exists. But so far it won't work with all of
Not sure if it helps, but I was initially interested in the record
associated with a StatementInvalid exception.
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.