Exception: WifiWand::Error

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

Overview

Base error class - keep for backward compatibility

Instance Method Summary collapse

Instance Method Details

#append_help_hint?Boolean

Returns:

  • (Boolean)


17
# File 'lib/wifi_wand/errors.rb', line 17

def append_help_hint? = true

#display_messageObject

Subclasses can override this when CLI output needs more context than Exception#message while preserving message for exception matching.



13
# File 'lib/wifi_wand/errors.rb', line 13

def display_message = nil

#exception(_message = nil) ⇒ Object

Returning self keeps raise(SomeError.new(...)) compatible with keyword-only constructors. Ruby calls exception while raising an existing exception object.



9
# File 'lib/wifi_wand/errors.rb', line 9

def exception(_message = nil) = self

#message_for_displayObject



15
# File 'lib/wifi_wand/errors.rb', line 15

def message_for_display = display_message || to_s