FailureContext class

@deprecated Use ArtifactContext directly.

Backward-compatible context that wraps a FailureContext into an ArtifactContext with reason 'failure'.

Constructors

FailureContext({required AppFailure failure, required StackTrace stackTrace, String? useCaseName, Map<String, dynamic> metadata = const {}, List<String> pathSegments = const [], DateTime? timestamp})

Properties

failure → AppFailure
The failure that occurred.
final
hashCode → int
The hash code for this object.
no setterinherited
isCancellation → bool
Convenience getter to check if this is a cancellation.
no setter
isScrapingFailure → bool
Convenience getter to check if this is a scraping-related failure.
no setter
metadata → Map<String, dynamic>
Arbitrary metadata associated with this failure.
final
pathSegments → List<String>
Optional path segments for artifact storage.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stackTrace → StackTrace
Stack trace from where the failure originated.
final
timestamp → DateTime
When this failure was captured.
final
useCaseName → String?
Name of the UseCase that triggered this failure (if applicable).
final

Methods

get<T>(String key) → T?
Access metadata with type safety.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toArtifactContext() → ArtifactContext
Convert to an ArtifactContext.
toString() → String
A string representation of this object.
override

Operators

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