abstract class AppException implements Exception {
  final String userMessage;
  final String? technicalDetails;
  final bool allowRetry;

  const AppException({
    required this.userMessage,
    this.technicalDetails,
    this.allowRetry = true,
  });

  @override
  String toString() => technicalDetails == null
      ? '$runtimeType: $userMessage'
      : '$runtimeType: $userMessage ($technicalDetails)';
}
