AgendaTasks/lib/core/errors/exceptions.dart
m3mo cb308bbf68 Initial project setup with Clean Architecture
- Flutter frontend with Provider state management
- FastAPI backend with SQLAlchemy ORM
- Internationalization support (EN/DE)
- Clean Architecture folder structure
- GoRouter for navigation
- GetIt for dependency injection
2026-02-02 16:43:37 +01:00

38 lines
922 B
Dart

class ServerException implements Exception {
final String message;
final int? statusCode;
const ServerException({required this.message, this.statusCode});
@override
String toString() => 'ServerException: $message (status: $statusCode)';
}
class NetworkException implements Exception {
final String message;
const NetworkException({this.message = 'Network connection failed'});
@override
String toString() => 'NetworkException: $message';
}
class ValidationException implements Exception {
final String message;
final Map<String, dynamic>? errors;
const ValidationException({required this.message, this.errors});
@override
String toString() => 'ValidationException: $message';
}
class NotFoundException implements Exception {
final String message;
const NotFoundException({this.message = 'Resource not found'});
@override
String toString() => 'NotFoundException: $message';
}