Class: Bosh::Director::ErrorIgnorer

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/error_ignorer.rb

Instance Method Summary collapse

Constructor Details

#initialize(force, logger) ⇒ ErrorIgnorer

Returns a new instance of ErrorIgnorer.



3
4
5
6
# File 'lib/bosh/director/error_ignorer.rb', line 3

def initialize(force, logger)
  @force = force
  @logger = logger
end

Instance Method Details

#with_force_checkObject



8
9
10
11
12
13
# File 'lib/bosh/director/error_ignorer.rb', line 8

def with_force_check
  yield
rescue => e
  raise unless @force
  @logger.error("Force deleting is set, ignoring exception: #{e.inspect}\n#{e.backtrace.join("\n")}")
end