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
@@ -1,19 +1,48 @@
import 'package:jmap_dart_client/jmap/core/error/set_error.dart';
import 'package:jmap_dart_client/jmap/core/id.dart';
import 'package:core/domain/exceptions/app_base_exception.dart';
class NotFoundCalendarEventException implements Exception {}
class NotFoundCalendarEventException extends AppBaseException {
NotFoundCalendarEventException([super.message]);
class NotParsableCalendarEventException implements Exception {}
@override
String get exceptionName => 'NotFoundCalendarEventException';
}
class NotAcceptableCalendarEventException implements Exception {}
class NotParsableCalendarEventException extends AppBaseException {
NotParsableCalendarEventException([super.message]);
class NotMaybeableCalendarEventException implements Exception {}
@override
String get exceptionName => 'NotParsableCalendarEventException';
}
class NotRejectableCalendarEventException implements Exception {}
class NotAcceptableCalendarEventException extends AppBaseException {
NotAcceptableCalendarEventException([super.message]);
class CannotReplyCalendarEventException implements Exception {
@override
String get exceptionName => 'NotAcceptableCalendarEventException';
}
class NotMaybeableCalendarEventException extends AppBaseException {
NotMaybeableCalendarEventException([super.message]);
@override
String get exceptionName => 'NotMaybeableCalendarEventException';
}
class NotRejectableCalendarEventException extends AppBaseException {
NotRejectableCalendarEventException([super.message]);
@override
String get exceptionName => 'NotRejectableCalendarEventException';
}
class CannotReplyCalendarEventException extends AppBaseException {
final Map<Id, SetError>? mapErrors;
CannotReplyCalendarEventException({this.mapErrors});
}
CannotReplyCalendarEventException({this.mapErrors})
: super(mapErrors != null ? 'Errors: $mapErrors' : null);
@override
String get exceptionName => 'CannotReplyCalendarEventException';
}