Module: GdsApi::ExceptionHandling
- Included in:
- JsonClient, Panopticon
- Defined in:
- lib/gds_api/exceptions.rb
Instance Method Summary collapse
Instance Method Details
#ignoring(exception_or_exceptions, &block) ⇒ Object
32 33 34 35 36 |
# File 'lib/gds_api/exceptions.rb', line 32 def ignoring(exception_or_exceptions, &block) yield rescue *exception_or_exceptions # Discard the exception end |
#ignoring_missing(&block) ⇒ Object
38 39 40 |
# File 'lib/gds_api/exceptions.rb', line 38 def ignoring_missing(&block) ignoring([HTTPNotFound, HTTPGone], &block) end |