TF-1899 Add failure param when handleExceptionAction
(cherry picked from commit 3e87b9fb2c17ebc6524003d3587be02317a7a768)
This commit is contained in:
@@ -96,7 +96,7 @@ abstract class BaseController extends GetxController
|
|||||||
if (failure is FeatureFailure) {
|
if (failure is FeatureFailure) {
|
||||||
final exception = _performFilterExceptionInError(failure.exception);
|
final exception = _performFilterExceptionInError(failure.exception);
|
||||||
if (exception != null) {
|
if (exception != null) {
|
||||||
handleExceptionAction(exception);
|
handleExceptionAction(failure: failure, exception: exception);
|
||||||
} else {
|
} else {
|
||||||
handleFailureViewState(failure);
|
handleFailureViewState(failure);
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ abstract class BaseController extends GetxController
|
|||||||
logError('BaseController::onError():error: $error | stackTrace: $stackTrace');
|
logError('BaseController::onError():error: $error | stackTrace: $stackTrace');
|
||||||
final exception = _performFilterExceptionInError(error);
|
final exception = _performFilterExceptionInError(error);
|
||||||
if (exception != null) {
|
if (exception != null) {
|
||||||
handleExceptionAction(exception);
|
handleExceptionAction(exception: exception);
|
||||||
} else {
|
} else {
|
||||||
handleErrorViewState(error, stackTrace);
|
handleErrorViewState(error, stackTrace);
|
||||||
}
|
}
|
||||||
@@ -150,8 +150,8 @@ abstract class BaseController extends GetxController
|
|||||||
|
|
||||||
void handleErrorViewState(Object error, StackTrace stackTrace) {}
|
void handleErrorViewState(Object error, StackTrace stackTrace) {}
|
||||||
|
|
||||||
void handleExceptionAction(Exception exception) {
|
void handleExceptionAction({Failure? failure, Exception? exception}) {
|
||||||
log('BaseController::handleExceptionAction():exception: $exception');
|
log('BaseController::handleExceptionAction():failure: $failure | exception: $exception');
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleFailureViewState(Failure failure) {
|
void handleFailureViewState(Failure failure) {
|
||||||
|
|||||||
@@ -189,8 +189,8 @@ class LoginController extends ReloadableController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void handleExceptionAction(Exception exception) {
|
void handleExceptionAction({Failure? failure, Exception? exception}) {
|
||||||
super.handleExceptionAction(exception);
|
super.handleExceptionAction(failure: failure, exception: exception);
|
||||||
loginState.value = LoginState(Right(LoginInitAction()));
|
loginState.value = LoginState(Right(LoginInitAction()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,9 +74,9 @@ class SessionController extends ReloadableController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void handleExceptionAction(Exception exception) {
|
void handleExceptionAction({Failure? failure, Exception? exception}) {
|
||||||
super.handleExceptionAction(exception);
|
super.handleExceptionAction(failure: failure, exception: exception);
|
||||||
if (PlatformInfo.isMobile && exception is NoNetworkError) {
|
if (PlatformInfo.isMobile && failure is GetSessionFailure && exception is NoNetworkError) {
|
||||||
_handleGetStoredSession();
|
_handleGetStoredSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,8 +190,8 @@ class ThreadController extends BaseController with EmailActionController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void handleExceptionAction(Exception exception) {
|
void handleExceptionAction({Failure? failure, Exception? exception}) {
|
||||||
super.handleExceptionAction(exception);
|
super.handleExceptionAction(failure: failure, exception: exception);
|
||||||
clearState();
|
clearState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user