Files
workavia-mail-front/lib/features/login/domain/exceptions/authentication_exception.dart
T
2022-06-01 14:31:58 +07:00

30 lines
826 B
Dart

import 'package:equatable/equatable.dart';
abstract class AuthenticationException extends Equatable {
static const wrongCredential = 'Credential is wrong';
static const invalidBaseUrl = 'Invalid base URL';
const AuthenticationException(String message);
}
class BadCredentials extends AuthenticationException {
const BadCredentials() : super(AuthenticationException.wrongCredential);
@override
List<Object> get props => [];
}
class NotFoundAuthenticatedAccountException implements Exception {
NotFoundAuthenticatedAccountException();
}
class NotFoundStoredTokenException implements Exception {
NotFoundStoredTokenException();
}
class InvalidBaseUrl extends AuthenticationException {
const InvalidBaseUrl() : super(AuthenticationException.invalidBaseUrl);
@override
List<Object?> get props => [];
}