From 674655b5a8eeb836a70e5c14101bd488b34baa35 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sun, 6 Oct 2019 11:46:16 +0200 Subject: [PATCH] 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. --- lib/apis/git.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/apis/git.dart b/lib/apis/git.dart index 890df847..eb81b07b 100644 --- a/lib/apis/git.dart +++ b/lib/apis/git.dart @@ -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;