instance method
capture_fatal_notice
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
capture_fatal_notice(result)
No documentation comment.
Parameters
-
resultreq
Source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 863
def capture_fatal_notice(result)
return false unless connection_terminating_severity?(result)
begin
result.check
rescue PG::Error => error
# result will be cleared when the notice handler returns, so
# we need to replace it on the exception with a snapshot.
snapshot = ErrorResultSnapshot.new(result)
error.define_singleton_method(:result) { snapshot }
@notice_receiver_fatal_error = error
end
@last_activity = nil
@verified = false
@needs_reconnect = true
true
end
Defined in activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb line 863
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter