Added in API level 29

DnsResolver.DnsException


public static class DnsResolver.DnsException
extends Exception

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ android.net.DnsResolver.DnsException


Class to represent DNS error

Summary

Fields

public final int code

DNS error code as one of the ERROR_* constants.

Public constructors

DnsException(int code, Throwable cause)

Inherited methods

Fields

code

Added in API level 29
public final int code

DNS error code as one of the ERROR_* constants.
Value is one of the following:

Public constructors

DnsException

Added in API level 33
public DnsException (int code, 
                Throwable cause)

Parameters
code int: Value is one of the following:
cause Throwable: This value may be null.