Files
retail/lib/core/errors/exceptions.dart
Phuoc Nguyen b94c158004 runable
2025-10-10 16:38:07 +07:00

31 lines
862 B
Dart

/// Custom exceptions for the application
class ServerException implements Exception {
final String message;
ServerException([this.message = 'Server error occurred']);
}
class CacheException implements Exception {
final String message;
CacheException([this.message = 'Cache error occurred']);
}
class NetworkException implements Exception {
final String message;
NetworkException([this.message = 'Network error occurred']);
}
class ValidationException implements Exception {
final String message;
ValidationException([this.message = 'Validation error occurred']);
}
class NotFoundException implements Exception {
final String message;
NotFoundException([this.message = 'Resource not found']);
}
class UnauthorizedException implements Exception {
final String message;
UnauthorizedException([this.message = 'Unauthorized access']);
}