ExceptionDiagnosisReporter class abstract interface

Defines the contract for components responsible for handling and reporting structured exception diagnoses.

An ExceptionDiagnosisReporter receives an ExceptionDiagnosis produced by an ExceptionDiagnoser and performs some form of reporting, such as:

  • Logging the diagnosis to a console or file
  • Sending the diagnosis to an external monitoring or alerting service
  • Persisting it for later analysis
  • Triggering automated remediation workflows

This interface separates diagnosis from reporting, allowing the reporting mechanism to be swapped or extended without altering the diagnostic logic.

Example

class ConsoleReporter implements ExceptionDiagnosisReporter {
  @override
  void report(ExceptionDiagnosis diagnosis) {
    print("Exception: ${diagnosis.cause}");
    print("Description: ${diagnosis.getDescription()}");
    if (diagnosis.action != null) {
      print("Recommended Action: ${diagnosis.action}");
    }
  }
}
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
report(ExceptionDiagnosis diagnosis) → void
Reports the given ExceptionDiagnosis using the reporter’s output mechanism.
toString() String
A string representation of this object.
inherited

Operators

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