Exception: Dommy::Bridge::ThrowValue
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Dommy::Bridge::ThrowValue
- Defined in:
- lib/dommy/bridge.rb
Overview
Raised by a host method that must throw an ARBITRARY value back to JS —
not a DOMException/Error, but e.g. signal.throwIfAborted() throwing the
exact abort reason (a string, number, or opaque JSValue). The bridge
re-throws the wrapped value verbatim (identity preserved). Subclasses
RuntimeError (with the value's string form as the message) so standalone
CRuby callers still see a normal raise-able error.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ ThrowValue
constructor
A new instance of ThrowValue.
Constructor Details
#initialize(value) ⇒ ThrowValue
Returns a new instance of ThrowValue.
78 79 80 81 |
# File 'lib/dommy/bridge.rb', line 78 def initialize(value) @value = value super(value.to_s) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
76 77 78 |
# File 'lib/dommy/bridge.rb', line 76 def value @value end |