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
+15 -4
View File
@@ -1,16 +1,27 @@
import 'package:equatable/equatable.dart';
abstract class CacheException with EquatableMixin implements Exception {
final String? message;
const CacheException({this.message});
String get exceptionName;
@override
String toString() {
if (message != null) {
return '$exceptionName: $message';
}
return exceptionName;
}
}
class UnknownCacheError extends CacheException {
const UnknownCacheError({String? message}) : super(message: message);
@override
List<Object> get props => [];
}
String get exceptionName => 'UnknownCacheError';
@override
List<Object?> get props => [message];
}