- 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
38 lines
922 B
Dart
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';
|
|
}
|