TF-4136 refactor(logging): replace logError with logWarning for non-critical cases

This commit is contained in:
dab246
2026-01-02 12:18:38 +07:00
committed by Dat H. Pham
parent 73dcb6067c
commit a23d15a9ca
160 changed files with 382 additions and 360 deletions
@@ -10,11 +10,15 @@ import 'package:tmail_ui_user/main/routes/route_navigation.dart';
class SendEmailExceptionThrower extends RemoteExceptionThrower {
@override
FutureOr<void> throwException(error, stackTrace) async {
log('SendEmailExceptionThrower::throwException(): $error | stackTrace: $stackTrace');
logError(
'SendEmailExceptionThrower::throwException():error: $error | stackTrace: $stackTrace',
exception: error,
stackTrace: stackTrace,
);
final networkConnectionController = getBinding<NetworkConnectionController>();
final realtimeNetworkConnectionStatus = await networkConnectionController?.hasInternetConnection();
if (realtimeNetworkConnectionStatus == false) {
logError('SendEmailExceptionThrower::throwException(): No realtime network connection');
logWarning('SendEmailExceptionThrower::throwException(): No realtime network connection');
throw const NoNetworkError();
} else {
handleDioError(error);