AbstractExceptionDiagnoser<E extends Exception> class abstract

Base class for creating typed exception diagnosers that target a specific exception type E.

This abstract diagnoser:

Subclasses must implement doDiagnose to provide meaningful `ExceptionDiagnosis` for the matched exception type.

Example

class FormatExceptionDiagnoser extends AbstractExceptionDiagnoser<FormatException> {
  @override
  ExceptionDiagnosis? doDiagnose(Exception exception, FormatException cause) {
    return ExceptionDiagnosis(
      cause: cause,
      description: "Invalid format encountered",
      action: "Check input data or configuration",
    );
  }
}
Implemented types
Annotations
  • @Generic(AbstractExceptionDiagnoser)

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

diagnose(Exception exception) ExceptionDiagnosis?
Produces an ExceptionDiagnosis describing the given exception.
override
doDiagnose(Exception exception, E cause) ExceptionDiagnosis?
Performs the actual diagnosis for the matched cause.
getCause<Cause extends Exception>(Exception exception, Class<Cause> type) → Cause?
Searches the exception chain for a cause of type Cause.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toClass() Class<E>
Provides a contract for types capable of exposing their associated runtime Class metadata representation within the JetLeaf reflection system.
override
toString() String
A string representation of this object.
inherited

Operators

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