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.



576
577
578
579
# File 'lib/mb/errors.rb', line 576

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

Instance Attribute Details

#expectedObject (readonly)

Returns the value of attribute expected.



573
574
575
# File 'lib/mb/errors.rb', line 573

def expected
  @expected
end

#gotObject (readonly)

Returns the value of attribute got.



574
575
576
# File 'lib/mb/errors.rb', line 574

def got
  @got
end

Instance Method Details

#messageObject



581
582
583
# File 'lib/mb/errors.rb', line 581

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