Fixup Constant some token exception

This commit is contained in:
Dat H. Pham
2026-03-09 09:02:55 +07:00
committed by Dat H. Pham
parent 437c46f5ff
commit 3e39f59f20
5 changed files with 24 additions and 22 deletions
@@ -1,84 +1,84 @@
import 'package:core/domain/exceptions/app_base_exception.dart';
class NotSupportFCMException extends AppBaseException {
NotSupportFCMException([super.message]);
const NotSupportFCMException([super.message]);
@override
String get exceptionName => 'NotSupportFCMException';
}
class NotLoadedFCMTokenException extends AppBaseException {
NotLoadedFCMTokenException([super.message]);
const NotLoadedFCMTokenException([super.message]);
@override
String get exceptionName => 'NotLoadedFCMTokenException';
}
class NotFoundStateToRefreshException extends AppBaseException {
NotFoundStateToRefreshException([super.message]);
const NotFoundStateToRefreshException([super.message]);
@override
String get exceptionName => 'NotFoundStateToRefreshException';
}
class NotFoundEmailDeliveryStateException extends AppBaseException {
NotFoundEmailDeliveryStateException([super.message]);
const NotFoundEmailDeliveryStateException([super.message]);
@override
String get exceptionName => 'NotFoundEmailDeliveryStateException';
}
class NotFoundFirebaseRegistrationForDeviceException extends AppBaseException {
NotFoundFirebaseRegistrationForDeviceException([super.message]);
const NotFoundFirebaseRegistrationForDeviceException([super.message]);
@override
String get exceptionName => 'NotFoundFirebaseRegistrationForDeviceException';
}
class NotFoundFirebaseRegistrationCacheException extends AppBaseException {
NotFoundFirebaseRegistrationCacheException([super.message]);
const NotFoundFirebaseRegistrationCacheException([super.message]);
@override
String get exceptionName => 'NotFoundFirebaseRegistrationCacheException';
}
class NotFoundEmailStateException extends AppBaseException {
NotFoundEmailStateException([super.message]);
const NotFoundEmailStateException([super.message]);
@override
String get exceptionName => 'NotFoundEmailStateException';
}
class NotFoundNewReceiveEmailException extends AppBaseException {
NotFoundNewReceiveEmailException([super.message]);
const NotFoundNewReceiveEmailException([super.message]);
@override
String get exceptionName => 'NotFoundNewReceiveEmailException';
}
class EmailStateNoChangeException extends AppBaseException {
EmailStateNoChangeException([super.message]);
const EmailStateNoChangeException([super.message]);
@override
String get exceptionName => 'EmailStateNoChangeException';
}
class NotFoundFirebaseRegistrationCreatedException extends AppBaseException {
NotFoundFirebaseRegistrationCreatedException([super.message]);
const NotFoundFirebaseRegistrationCreatedException([super.message]);
@override
String get exceptionName => 'NotFoundFirebaseRegistrationCreatedException';
}
class NotFoundFirebaseRegistrationUpdatedException extends AppBaseException {
NotFoundFirebaseRegistrationUpdatedException([super.message]);
const NotFoundFirebaseRegistrationUpdatedException([super.message]);
@override
String get exceptionName => 'NotFoundFirebaseRegistrationUpdatedException';
}
class NotFoundFirebaseRegistrationDestroyedException extends AppBaseException {
NotFoundFirebaseRegistrationDestroyedException([super.message]);
const NotFoundFirebaseRegistrationDestroyedException([super.message]);
@override
String get exceptionName => 'NotFoundFirebaseRegistrationDestroyedException';
+1 -1
View File
@@ -9,7 +9,7 @@ abstract class CacheException with EquatableMixin implements Exception {
@override
String toString() {
if (message != null) {
if (message?.trim().isNotEmpty == true) {
return '$exceptionName: $message';
}
return exceptionName;
+6 -4
View File
@@ -112,10 +112,12 @@ class NoNetworkError extends RemoteException {
class RefreshTokenFailedException extends RemoteException {
RefreshTokenFailedException({
super.message =
'Refresh Token failed with 400 Bad Request. The session is invalid/revoked.',
super.code = 400,
});
int code = 400,
Object? message
}) : super(
code: code,
message: message ?? 'Refresh Token failed with 400 Bad Request. The session is invalid/revoked.',
);
@override
String get exceptionName => 'RefreshTokenFailedException';