Exception: MotherBrain::UnexpectedProvisionCount

Inherits:
ProvisionError show all
Defined in:
lib/mb/errors.rb

Constant Summary

Constants inherited from MBError

MBError::DEFAULT_EXIT_CODE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from MBError

#error_code, error_code, exit_code, #exit_code, #to_hash, #to_json, #to_s

Constructor Details

#initialize(expected, got) ⇒ UnexpectedProvisionCount

Returns a new instance of UnexpectedProvisionCount.



559
560
561
562
# File 'lib/mb/errors.rb', line 559

def initialize(expected, got)
  @expected = expected
  @got      = got
end

Instance Attribute Details

#expectedObject (readonly)

Returns the value of attribute expected.



556
557
558
# File 'lib/mb/errors.rb', line 556

def expected
  @expected
end

#gotObject (readonly)

Returns the value of attribute got.



557
558
559
# File 'lib/mb/errors.rb', line 557

def got
  @got
end

Instance Method Details

#messageObject



564
565
566
# File 'lib/mb/errors.rb', line 564

def message
  "Expected '#{expected}' nodes to be provisioned but got: '#{got}'"
end