31 lines
862 B
Dart
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']);
|
|
}
|