StorageException constructor

StorageException({
  1. required String userMessage,
  2. required String devMessage,
  3. required String operation,
  4. String? key,
  5. String? storageType,
  6. Object? cause,
  7. StackTrace? stack,
  8. Map<String, dynamic> metadata = const {},
  9. Severity severity = Severity.error,
  10. bool isReportable = true,
})

Creates a storage exception describing the failed operation and optional key.

Implementation

StorageException({
  required super.userMessage,
  required super.devMessage,
  required this.operation,
  this.key,
  this.storageType,
  super.cause,
  super.stack,
  Map<String, dynamic> metadata = const {},
  super.severity,
  super.isReportable,
}) : super(
        metadata: {
          'operation': operation,
          if (key != null) 'key': key,
          if (storageType != null) 'storageType': storageType,
          ...metadata,
        },
      );