mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 14:41:08 +00:00
Improved error reporting
This commit is contained in:
parent
81a5ebfd02
commit
02ccd0d93a
1 changed files with 3 additions and 2 deletions
|
@ -76,6 +76,7 @@ import androidx.lifecycle.Lifecycle;
|
|||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.IDN;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
@ -468,7 +469,7 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
Uri uri = args.getParcelable("uri");
|
||||
String host = UriHelper.getRootDomain(context, UriHelper.getHost(uri));
|
||||
if (TextUtils.isEmpty(host))
|
||||
throw new UnknownHostException("Host unknown " + uri);
|
||||
throw new UnknownHostException("No root domain " + uri);
|
||||
args.putString("host", host);
|
||||
return Whois.get(host);
|
||||
}
|
||||
|
@ -501,7 +502,7 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
Log.unexpectedError(getParentFragmentManager(), ex, !(ex instanceof IOException));
|
||||
}
|
||||
}.execute(FragmentDialogOpenLink.this, args, "link:whois");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue