V4.6.1 report fixes (#859)

* Add exception handler to anypay api response failure

* Check if context is still mounted before fetching iPad position

* Add user connection issue to ignored errors

* Wrap launchURL in empty try catch to avoid package un-needed exceptions
This commit is contained in:
Omar Hatem
2023-03-31 21:14:22 +02:00
committed by GitHub
parent 72df78ad8c
commit 37ef63d09e
6 changed files with 39 additions and 16 deletions
+2
View File
@@ -136,9 +136,11 @@ class ExceptionHandler {
"errno = 54", // SocketException: Connection reset by peer
"errno = 57", // SocketException: Read failed (OS Error: Socket is not connected)
"errno = 60", // SocketException: Operation timed out
"errno = 65", // SocketException: No route to host
"errno = 103", // SocketException: Software caused connection abort
"errno = 104", // SocketException: Connection reset by peer
"errno = 110", // SocketException: Connection timed out
"HttpException: Connection reset by peer",
"HttpException: Connection closed before full header was received",
"HandshakeException: Connection terminated during handshake",
"PERMISSION_NOT_GRANTED",
+5 -1
View File
@@ -28,7 +28,11 @@ class ShareUtil {
);
}
static Rect? _sharePosition(BuildContext context) {
static Rect _sharePosition(BuildContext context) {
if (!context.mounted) {
return Rect.zero;
}
final box = context.findRenderObject() as RenderBox?;
return box!.localToGlobal(Offset.zero) & box.size;