ExceptionReport class

标准化异常报告。

Constructors

ExceptionReport({required Object error, required String message, required String errorType, required ExceptionSource source, required ExceptionSeverity severity, DateTime? timestamp, StackTrace? stackTrace, String? flutterLibrary, String? flutterContext, Map<String, Object?> environment = const <String, Object?>{}, Map<String, Object?> appContext = const <String, Object?>{}, Map<String, Object?> customContext = const <String, Object?>{}, List<Breadcrumb> breadcrumbs = const <Breadcrumb>[]})
创建异常报告。

Properties

appContext → Map<String, Object?>
应用上下文信息。
final
异常前的行为链路。
final
customContext → Map<String, Object?>
调用方传入的自定义上下文。
final
environment → Map<String, Object?>
运行环境信息。
final
error → Object
原始异常对象。
final
errorType → String
异常类型名称。
final
fatal → bool
是否为致命异常。
no setter
fingerprint → String
用于去重的异常指纹。
no setter
flutterContext → String?
Flutter 错误上下文。
final
flutterLibrary → String?
Flutter 错误所属库。
final
hashCode → int
The hash code for this object.
no setterinherited
message → String
异常消息。
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
severity → ExceptionSeverity
异常严重级别。
final
source → ExceptionSource
异常来源。
final
stackTrace → StackTrace?
异常堆栈。
final
timestamp → DateTime
报告创建时间。
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redact(Set<String> keys) → ExceptionReport
脱敏指定 key 对应的数据。
toJson() → Map<String, Object?>
转换为可上报的 JSON 数据。
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

schemaVersion → const int
报告数据结构版本。