mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
- Ignore Socket Exception "bad file descriptor"
- Add nullability to anypay API response failure [skip ci]
This commit is contained in:
parent
f5fa87abfd
commit
d85805902d
2 changed files with 6 additions and 5 deletions
|
@ -59,7 +59,7 @@ class ExceptionHandler {
|
|||
}
|
||||
|
||||
static void onError(FlutterErrorDetails errorDetails) {
|
||||
if (_isErrorFromUser(errorDetails.exception.toString())) {
|
||||
if (_ignoreError(errorDetails.exception.toString())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -97,8 +97,9 @@ class ExceptionHandler {
|
|||
);
|
||||
}
|
||||
|
||||
/// User related errors to be added as exceptions here to not report
|
||||
static bool _isErrorFromUser(String error) {
|
||||
return error.contains("Software caused connection abort"); // User connection issue
|
||||
/// Ignore User related errors or system errors
|
||||
static bool _ignoreError(String error) {
|
||||
return error.contains("errno = 103") || // SocketException: Software caused connection abort
|
||||
error.contains("errno = 9"); // SocketException: Bad file descriptor (iOS socket exception)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue