17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/connectors/tolerable_error_helper.rb', line 17
def yield_single_document(identifier: nil)
Utility::Logger.debug("Extracting single document for #{identifier}") if identifier
yield
@error_monitor.note_success
rescue *fatal_exception_classes => e
Utility::ExceptionTracking.augment_exception(e)
Utility::Logger.error("Encountered a fall-through error during extraction#{identifying_error_message(identifier)}: #{e.class}: #{e.message} {:message_id => #{e.id}}")
raise
rescue StandardError => e
Utility::ExceptionTracking.augment_exception(e)
Utility::Logger.warn("Encountered error during extraction#{identifying_error_message(identifier)}: #{e.class}: #{e.message} {:message_id => #{e.id}}")
@error_monitor.note_error(e, :id => e.id)
end
|