Exception: WifiWand::DnsConfigurationError
- Inherits:
-
ConfigurationError
- Object
- RuntimeError
- Error
- ConfigurationError
- WifiWand::DnsConfigurationError
- Defined in:
- lib/wifi_wand/errors.rb
Instance Attribute Summary collapse
-
#cause_error ⇒ Object
readonly
Returns the value of attribute cause_error.
-
#connection_name ⇒ Object
readonly
Returns the value of attribute connection_name.
-
#rollback_error ⇒ Object
readonly
Returns the value of attribute rollback_error.
-
#step ⇒ Object
readonly
Returns the value of attribute step.
Instance Method Summary collapse
-
#initialize(connection_name:, step:, cause_error:, rollback_error: nil) ⇒ DnsConfigurationError
constructor
A new instance of DnsConfigurationError.
- #to_h ⇒ Object
Methods inherited from Error
#append_help_hint?, #display_message, #exception, #message_for_display
Constructor Details
#initialize(connection_name:, step:, cause_error:, rollback_error: nil) ⇒ DnsConfigurationError
Returns a new instance of DnsConfigurationError.
344 345 346 347 348 349 350 351 352 353 |
# File 'lib/wifi_wand/errors.rb', line 344 def initialize(connection_name:, step:, cause_error:, rollback_error: nil) @connection_name = connection_name @step = step @cause_error = cause_error @rollback_error = rollback_error super( "Failed to update DNS for connection '#{connection_name}' while #{step_description}: #{error_detail}" ) end |
Instance Attribute Details
#cause_error ⇒ Object (readonly)
Returns the value of attribute cause_error.
342 343 344 |
# File 'lib/wifi_wand/errors.rb', line 342 def cause_error @cause_error end |
#connection_name ⇒ Object (readonly)
Returns the value of attribute connection_name.
342 343 344 |
# File 'lib/wifi_wand/errors.rb', line 342 def connection_name @connection_name end |
#rollback_error ⇒ Object (readonly)
Returns the value of attribute rollback_error.
342 343 344 |
# File 'lib/wifi_wand/errors.rb', line 342 def rollback_error @rollback_error end |
#step ⇒ Object (readonly)
Returns the value of attribute step.
342 343 344 |
# File 'lib/wifi_wand/errors.rb', line 342 def step @step end |
Instance Method Details
#to_h ⇒ Object
355 356 357 358 359 360 361 362 363 |
# File 'lib/wifi_wand/errors.rb', line 355 def to_h base = { connection_name: connection_name, step: step, error: error_summary(cause_error), } base[:rollback_error] = error_summary(rollback_error) if rollback_error base end |