14 lines
332 B
Dart
14 lines
332 B
Dart
import '../contracts/error.dart';
|
|
|
|
class DomainError implements Exception {
|
|
final ErrorCode code;
|
|
final String message;
|
|
final bool retryable;
|
|
final Object? details;
|
|
|
|
DomainError(this.code, this.message, {this.retryable = false, this.details});
|
|
|
|
@override
|
|
String toString() => 'DomainError(${code.value}): $message';
|
|
}
|