ErrorHandler class

Global error handler with recovery suggestions and reporting.

Constructors

ErrorHandler({int maxReports = 100})

Properties

errors Stream<ErrorReport>
Stream of error reports.
no setter
hashCode int
The hash code for this object.
no setterinherited
reports List<ErrorReport>
All collected reports.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clear all reports.
dispose() → void
Dispose resources.
exportReports() String
Export error reports as JSON.
formatError(Object error) String
Format error for display.
handle(Object error, [StackTrace? stackTrace]) ErrorReport
Handle an error, creating a report and suggesting recovery.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveReports(String path) Future<void>
Save error reports to file.
toString() String
A string representation of this object.
inherited

Operators

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