JsThrownException class final
JavaScript 代码主动 throw 或求值异常时的错误。
- Implemented types
- Available extensions
Constructors
- JsThrownException(String message, {String? name, String? stack, String? fileName, int? line, int? column, JsSourceMap? sourceMap})
-
Creates a structured JavaScript exception.
const
Properties
- column → int?
-
Zero-based generated or remapped source column.
final
- fileName → String?
-
Generated or remapped source name.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → JsErrorKind
-
Available on JsException, provided by the JsExceptionKind extension
Framework category used for recovery and reporting decisions.no setter - line → int?
-
One-based generated or remapped source line.
final
- message → String
-
Stable human-readable error message.
final
- name → String?
-
JavaScript error name, such as
TypeError, when available.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceMap → JsSourceMap?
-
Source map attached while remapping this exception.
final
- stack → String?
-
JavaScript stack text reported by the backend.
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
-
withSourceMap(
JsSourceMap? sourceMap, {String? stack, String? fileName, int? line, int? column}) → JsThrownException - Returns this exception enriched with source-map and location data.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited