Exception: WifiWand::QrCodeGenerationError

Inherits:
Error
  • Object
show all
Defined in:
lib/wifi_wand/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

#append_help_hint?, #display_message, #exception, #message_for_display

Constructor Details

#initialize(reason:, source: nil) ⇒ QrCodeGenerationError

Returns a new instance of QrCodeGenerationError.



189
190
191
192
193
# File 'lib/wifi_wand/errors.rb', line 189

def initialize(reason:, source: nil)
  @reason = reason
  @source = source
  super("Failed to generate QR code: #{reason}")
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



187
188
189
# File 'lib/wifi_wand/errors.rb', line 187

def reason
  @reason
end

#sourceObject (readonly)

Returns the value of attribute source.



187
188
189
# File 'lib/wifi_wand/errors.rb', line 187

def source
  @source
end