ErrorReporter class
Pluggable error-reporting hook for kat_common's utilities.
kat_common doesn't ship its own logging/crash-reporting stack — that lives
in whichever app consumes this package. Utilities here used to call the
host app's logger (CommonProvider.logError) directly, which is what made
them impossible to compile as part of this package. They report through
this hook instead, so kat_common has no hard dependency on the app.
Wire it up once at app startup:
ErrorReporter.report = (error, stackTrace) {
CommonProvider.logError(error, stackTrace);
};
Left unset, errors are swallowed silently — the same behavior these utilities already had at the call site (the error was already caught and handled there; only the reporting of it was optional).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- report ↔ void Function(Object error, StackTrace stackTrace)?
-
getter/setter pair
Static Methods
-
log(
Object error, StackTrace stackTrace) → void