WebJsError class
A web JavaScript error serialized into a typed, platform-agnostic Dart object (ERH-010).
Lives in its own (non-js_interop) file so it compiles on all targets —
the web handler module (web_error_handlers_web.dart) constructs it from a
real ErrorEvent/PromiseRejectionEvent, while VM/mobile tests can
reference the type directly.
Fidelity is load-bearing for two downstream consumers:
Constructors
- WebJsError(String message, String? name, StackTrace stack)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
The JS error message, preserved verbatim for redaction.
final
- name → String?
-
The JS
Error.name(e.g.NotAllowedError,TypeError) when available.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stack → StackTrace
-
The parsed JS stack (
StackTrace.fromString(error.stack)), orStackTrace.currentwhen the JS value carried no stack.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited