Provides an abstraction for reporting, logging, or forwarding exceptions that occur within the application.
An implementation of ExceptionReporter may:
- Log exceptions to a local or remote logging system
- Forward exceptions to monitoring providers
- Trigger alerting or analytics events
- Filter or process exceptions before reporting
This interface offers a simple, unified way for the framework or user code to submit exceptions without needing to know the underlying reporting mechanism.
Example
class ConsoleExceptionReporter implements ExceptionReporter {
@override
bool reportException(Exception exception) {
print("Exception captured: $exception");
return true;
}
}
Takes a no-arg constructor or single arg constructor of type ApplicationContext
- Implementers
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
-
reportException(
Exception exception) → bool -
Reports the given
exceptionto the underlying exception-handling system. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited