// SPDX-FileCopyrightText: 2026 FocusFlow contributors
// SPDX-License-Identifier: AGPL-3.0-only

part of '../../encrypted_backup.dart';

/// Thrown when backup input paths or file contents are invalid.
final class BackupException implements Exception {
  /// Creates a backup exception with diagnostic [message].
  const BackupException(this.message);

  /// Diagnostic text for logs and tests.
  final String message;

  /// Converts scheduler data for `toString` without changing the source object.
  /// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
  @override
  String toString() => 'BackupException: $message';
}
