Add Exception for user's network issues to not be reported [skip ci]

OmarHatem committed Feb 1, 2023 at 17:24 UTC 08ff37e23c1f6992dba1a717df7ddce57143dc04
1 file changed +5
lib/main.dart
+5
@@ -207,6 +207,11 @@ void _sendExceptionFile() async {
207 }
208
209 void _onError(FlutterErrorDetails errorDetails) {
210 + // Add Exception for user's network connection issues to not be reported
211 + if (errorDetails.exception.toString().contains("Software caused connection abort")) {
212 + return;
213 + }
214 +
215 _saveException(errorDetails.exception.toString(), errorDetails.stack);
216
217 if (hasError) {