new project stable version
This commit is contained in:
8
lib/data/exceptions/auth_block_exception.dart
Normal file
8
lib/data/exceptions/auth_block_exception.dart
Normal file
@@ -0,0 +1,8 @@
|
||||
class AuthBlockException implements Exception {
|
||||
String description = "Неверный код. Вы временно заблокированы, попробуйте позже.";
|
||||
|
||||
AuthBlockException();
|
||||
|
||||
@override
|
||||
String toString() => description;
|
||||
}
|
||||
9
lib/data/exceptions/auth_exception.dart
Normal file
9
lib/data/exceptions/auth_exception.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
class AuthException implements Exception {
|
||||
int attemptsLeft;
|
||||
String? description;
|
||||
|
||||
AuthException(this.description, this.attemptsLeft);
|
||||
|
||||
@override
|
||||
String toString() => description ?? "Ошибка авторизации";
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class RouteHistoryNotFoundException implements Exception {
|
||||
final String message;
|
||||
|
||||
RouteHistoryNotFoundException({this.message = "История маршрута не найдена"});
|
||||
|
||||
@override
|
||||
String toString() => message;
|
||||
}
|
||||
8
lib/data/exceptions/scooter_not_found_exception.dart
Normal file
8
lib/data/exceptions/scooter_not_found_exception.dart
Normal file
@@ -0,0 +1,8 @@
|
||||
class ScooterNotFoundException implements Exception {
|
||||
final String message;
|
||||
|
||||
ScooterNotFoundException({this.message = "Самокат не найден"});
|
||||
|
||||
@override
|
||||
String toString() => message;
|
||||
}
|
||||
5
lib/data/exceptions/unauthorized_exception.dart
Normal file
5
lib/data/exceptions/unauthorized_exception.dart
Normal file
@@ -0,0 +1,5 @@
|
||||
class UnauthorizedException implements Exception {
|
||||
|
||||
@override
|
||||
String toString() => "Ошибка авторизации. Пользователь не авторизован";
|
||||
}
|
||||
6
lib/data/exceptions/wrong_zone_exception.dart
Normal file
6
lib/data/exceptions/wrong_zone_exception.dart
Normal file
@@ -0,0 +1,6 @@
|
||||
class WrongZoneException implements Exception {
|
||||
final String message;
|
||||
|
||||
WrongZoneException({required this.message});
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user