Exception: Capybara::Simulated::WebauthnState::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/capybara/simulated/webauthn_state.rb

Overview

Mapped to DOMException name on the JS side. Apps branch on ‘err.name` (`’InvalidStateError’‘, `’NotAllowedError’‘, …) so the name has to survive the host-fn round-trip — `safe_call` would otherwise flatten exception classes to a plain nil. The host-fn wrapper in `runtime_shared.rb` rescues this class and returns `name:` to the JS shim instead.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, message) ⇒ Error

Returns a new instance of Error.



40
41
42
43
# File 'lib/capybara/simulated/webauthn_state.rb', line 40

def initialize(name, message)
  super(message)
  @webauthn_name = name
end

Instance Attribute Details

#webauthn_nameObject (readonly)

Returns the value of attribute webauthn_name.



39
40
41
# File 'lib/capybara/simulated/webauthn_state.rb', line 39

def webauthn_name
  @webauthn_name
end