Class: Bosh::Director::ErrorIgnorer
- Defined in:
- lib/bosh/director/error_ignorer.rb
Instance Method Summary collapse
-
#initialize(force, logger) ⇒ ErrorIgnorer
constructor
A new instance of ErrorIgnorer.
- #with_force_check ⇒ Object
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_check ⇒ Object
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 |