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
Value is DnsResolver.ERROR_PARSE, or DnsResolver.ERROR_SYSTEM

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 DnsResolver.ERROR_PARSE, or DnsResolver.ERROR_SYSTEM

Public constructors

DnsException

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

Parameters
code int: Value is DnsResolver.ERROR_PARSE, or DnsResolver.ERROR_SYSTEM

cause Throwable: This value may be null.