TF-4136 refactor(logging): replace logError with logWarning for non-critical cases
This commit is contained in:
@@ -482,7 +482,7 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
transformConfiguration
|
||||
));
|
||||
} catch (e) {
|
||||
logError('SingleEmailController::_getEmailContentAction(): $e');
|
||||
logWarning('SingleEmailController::_getEmailContentAction(): $e');
|
||||
consumeState(Stream.value(Left(GetEmailContentFailure(
|
||||
e,
|
||||
onRetry: e is UnknownUriException
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ extension HandleOpenAttachmentListExtension on SingleEmailController {
|
||||
}) {
|
||||
final scrollController = threadDetailController?.scrollController;
|
||||
if (scrollController == null || !scrollController.hasClients) {
|
||||
logError(
|
||||
logWarning(
|
||||
'$runtimeType::jumpToAttachmentList(): scrollController is null');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ class EmailUtils {
|
||||
MailAddress mailAddress = MailAddress.validateAddress(address);
|
||||
return GetUtils.isEmail(mailAddress.stripDetails().asString()) && mailAddress.asString().isNotEmpty;
|
||||
} catch(e) {
|
||||
logError('EmailUtils::isEmailAddressValid: Exception = $e');
|
||||
logWarning('EmailUtils::isEmailAddressValid: Exception = $e');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ class EmailUtils {
|
||||
|
||||
return matches.map((match) => match.group(1)!).toList();
|
||||
} catch (e) {
|
||||
logError('EmailUtils::extractMailtoLinksFromListPost:Exception = $e');
|
||||
logWarning('EmailUtils::extractMailtoLinksFromListPost:Exception = $e');
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ class EmailUtils {
|
||||
bccMailAddresses: bccMailAddresses
|
||||
);
|
||||
} catch (e) {
|
||||
logError('EmailUtils::extractRecipientsFromListMailtoLink:Exception = $e');
|
||||
logWarning('EmailUtils::extractRecipientsFromListMailtoLink:Exception = $e');
|
||||
return (
|
||||
toMailAddresses: [],
|
||||
ccMailAddresses: [],
|
||||
@@ -207,7 +207,7 @@ class EmailUtils {
|
||||
bccMailAddresses: navigationRouter.bcc ?? [],
|
||||
);
|
||||
} catch (e) {
|
||||
logError('EmailUtils::extractRecipientsFromMailtoLink:Exception = $e');
|
||||
logWarning('EmailUtils::extractRecipientsFromMailtoLink:Exception = $e');
|
||||
return (
|
||||
toMailAddresses: [],
|
||||
ccMailAddresses: [],
|
||||
@@ -240,7 +240,7 @@ class EmailUtils {
|
||||
type: type?.isNotEmpty == true ? MediaType.parse(type!) : null,
|
||||
);
|
||||
} catch (e) {
|
||||
logError('EmailUtils::parsingAttachmentByUri:Exception = $e:');
|
||||
logWarning('EmailUtils::parsingAttachmentByUri:Exception = $e:');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -329,7 +329,7 @@ class EmailUtils {
|
||||
MailAddress mailAddress = MailAddress.validateAddress(emailAddress);
|
||||
return mailAddress.domain.asString();
|
||||
} catch (e) {
|
||||
logError('EmailUtils::getDomainByEmailAddress:Exception is $e');
|
||||
logWarning('EmailUtils::getDomainByEmailAddress:Exception is $e');
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ class _PDFViewerState extends State<PDFViewer> {
|
||||
previewerOptions: PreviewerOptions(
|
||||
previewerState: previewerState,
|
||||
onError: (error) {
|
||||
logError('_PDFViewerState::build:openData:onError:: $error');
|
||||
logWarning('_PDFViewerState::build:openData:onError:: $error');
|
||||
_pdfViewStateNotifier.value = DownloadAttachmentForWebFailure(exception: error);
|
||||
},
|
||||
errorMessage: AppLocalizations.of(context).noPreviewAvailable,
|
||||
|
||||
Reference in New Issue
Block a user