Files
food_delivery_mobile/lib/core/exceptions/exceptions.dart
jahongireshonqulov 4c652c2b47 feat:dio client done
2025-10-28 17:03:13 +05:00

32 lines
784 B
Dart

import 'package:dio/dio.dart';
class ServerException implements Exception {
final String errorMessage;
final String errorKey;
final num statusCode;
const ServerException({
required this.statusCode,
required this.errorMessage,
required this.errorKey,
});
@override
String toString() {
return 'ServerException(statusCode: $statusCode, errorMessage: $errorMessage, errorKey: $errorKey)';
}
}
class CustomDioException implements Exception {
final String errorMessage;
final DioExceptionType type;
final int? statusCode;
CustomDioException({required this.errorMessage, required this.type, this.statusCode});
}
class ParsingException implements Exception {
final String errorMessage;
const ParsingException({required this.errorMessage});
}