refactor(sentry): standardize exceptions to prevent Sentry minification
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
class LabelKeywordIsNull implements Exception {
|
||||
import 'package:core/domain/exceptions/app_base_exception.dart';
|
||||
|
||||
class LabelKeywordIsNull extends AppBaseException {
|
||||
LabelKeywordIsNull([super.message = 'Label keyword is null']);
|
||||
|
||||
@override
|
||||
String toString() => 'Label keyword is null';
|
||||
String get exceptionName => 'LabelKeywordIsNull';
|
||||
}
|
||||
|
||||
class LabelIdIsNull implements Exception {
|
||||
class LabelIdIsNull extends AppBaseException {
|
||||
LabelIdIsNull([super.message = 'Label id is null']);
|
||||
|
||||
@override
|
||||
String toString() => 'Label id is null';
|
||||
String get exceptionName => 'LabelIdIsNull';
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ extension HandleLabelActionTypeExtension on LabelController {
|
||||
);
|
||||
} else if (editLabelInteractor == null) {
|
||||
consumeState(
|
||||
Stream.value(Left(EditLabelFailure(InteractorNotInitialized()))),
|
||||
Stream.value(Left(EditLabelFailure(const InteractorNotInitialized()))),
|
||||
);
|
||||
} else {
|
||||
final labelId = selectedLabel.id;
|
||||
@@ -159,7 +159,7 @@ extension HandleLabelActionTypeExtension on LabelController {
|
||||
} else if (deleteALabelInteractor == null) {
|
||||
emitFailure(
|
||||
controller: this,
|
||||
failure: DeleteALabelFailure(InteractorNotInitialized()),
|
||||
failure: DeleteALabelFailure(const InteractorNotInitialized()),
|
||||
);
|
||||
} else {
|
||||
consumeState(deleteALabelInteractor!.execute(accountId, label));
|
||||
|
||||
@@ -146,7 +146,7 @@ class LabelController extends BaseController with LabelContextMenuMixin {
|
||||
log('LabelController::_createNewLabel:Label: $label');
|
||||
if (_createNewLabelInteractor == null) {
|
||||
consumeState(
|
||||
Stream.value(Left(CreateNewLabelFailure(InteractorNotInitialized()))),
|
||||
Stream.value(Left(CreateNewLabelFailure(const InteractorNotInitialized()))),
|
||||
);
|
||||
} else {
|
||||
consumeState(_createNewLabelInteractor!.execute(accountId, label));
|
||||
|
||||
Reference in New Issue
Block a user