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.
67 68 69 70 |
# File 'lib/dommy/bridge.rb', line 67 def initialize(value) @value = value super(value.to_s) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
65 66 67 |
# File 'lib/dommy/bridge.rb', line 65 def value @value end |