TF-1899 Add failure param when handleExceptionAction

(cherry picked from commit 3e87b9fb2c17ebc6524003d3587be02317a7a768)
This commit is contained in:
dab246
2023-06-07 11:56:01 +07:00
committed by Dat Vu
parent ef49db7b91
commit 9f8eab3e01
4 changed files with 11 additions and 11 deletions
+4 -4
View File
@@ -96,7 +96,7 @@ abstract class BaseController extends GetxController
if (failure is FeatureFailure) {
final exception = _performFilterExceptionInError(failure.exception);
if (exception != null) {
handleExceptionAction(exception);
handleExceptionAction(failure: failure, exception: exception);
} else {
handleFailureViewState(failure);
}
@@ -111,7 +111,7 @@ abstract class BaseController extends GetxController
logError('BaseController::onError():error: $error | stackTrace: $stackTrace');
final exception = _performFilterExceptionInError(error);
if (exception != null) {
handleExceptionAction(exception);
handleExceptionAction(exception: exception);
} else {
handleErrorViewState(error, stackTrace);
}
@@ -150,8 +150,8 @@ abstract class BaseController extends GetxController
void handleErrorViewState(Object error, StackTrace stackTrace) {}
void handleExceptionAction(Exception exception) {
log('BaseController::handleExceptionAction():exception: $exception');
void handleExceptionAction({Failure? failure, Exception? exception}) {
log('BaseController::handleExceptionAction():failure: $failure | exception: $exception');
}
void handleFailureViewState(Failure failure) {