refactor(sentry): standardize exceptions to prevent Sentry minification

This commit is contained in:
dab246
2026-02-24 15:40:07 +07:00
committed by Dat H. Pham
parent 296548a781
commit 2e8a11e7eb
75 changed files with 1128 additions and 309 deletions
+17 -4
View File
@@ -1,15 +1,28 @@
import 'package:equatable/equatable.dart';
abstract class PermissionException with EquatableMixin implements Exception {
final String? message;
const PermissionException({this.message});
String get exceptionName;
@override
String toString() {
if (message != null) {
return '$exceptionName: $message';
}
return exceptionName;
}
}
class NotGrantedPermissionStorageException extends PermissionException {
const NotGrantedPermissionStorageException() : super(message: 'Permission Storage has not been granted access');
const NotGrantedPermissionStorageException()
: super(message: 'Permission Storage has not been granted access');
@override
List<Object?> get props => [super.message];
}
String get exceptionName => 'NotGrantedPermissionStorageException';
@override
List<Object?> get props => [message];
}