Ignore one more PlatformException

It's nice that we're logging all of these platform exceptions. It really
lets us see all the different errors people are having over time.
This commit is contained in:
Vishesh Handa
2019-10-06 11:46:16 +02:00
parent 112122cfcf
commit 674655b5a8

View File

@ -10,10 +10,14 @@ import 'package:flutter_crashlytics/flutter_crashlytics.dart';
const _platform = const MethodChannel('gitjournal.io/git');
bool shouldIgnorePlatformException(PlatformException ex) {
if (ex.message.contains("failed to resolve address for")) {
var msg = ex.message.toLowerCase();
if (msg.contains("failed to resolve address for")) {
return true;
}
if (ex.message.contains("No address associated with hostname")) {
if (msg.contains("No address associated with hostname")) {
return true;
}
if (msg.contains("failed to connect to")) {
return true;
}
return false;