Exception: ElasticBeans::DnsEntry::InvalidDnsValue

Inherits:
Error
  • Object
show all
Includes:
Nesty::NestedError
Defined in:
lib/elastic_beans/dns_entry.rb

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:, cause: nil) ⇒ InvalidDnsValue

Returns a new instance of InvalidDnsValue.



95
96
97
98
99
# File 'lib/elastic_beans/dns_entry.rb', line 95

def initialize(name:, value:, cause: nil)
  @name = name
  @value = value
  @nested = cause
end

Instance Method Details

#messageObject



101
102
103
104
105
106
# File 'lib/elastic_beans/dns_entry.rb', line 101

def message
  msg = "Attempted updating DNS entry `#{@name}' to value `#{@value}', which is not valid."
  msg << "\nThe error from AWS was \"#{@nested.message}\"" if @nested
  msg << "\nTry re-running this command:\n    #{command_as_string}"
  msg
end