API Reference
Class
DnsClientException
Represents exceptions specific to DnsClientX. This exception provides additional context by exposing the DNS response that caused the exception.
Inheritance
- Exception
- DnsClientException
Remarks
Thrown when an error occurs during resolution and the underlying response should be inspected.
Constructors
DnsClientException 3 overloads
public DnsClientException(String message) #Initializes a new instance of the DnsClientException class with a specified error message.
Parameters
- message System.String
- The message that describes the error.
public DnsClientException(String message, DnsResponse response) #Initializes a new instance of the DnsClientException class with a specified error message and the DNS response that caused this exception.
Parameters
- message System.String
- The message that describes the error.
- response DnsClientX.DnsResponse
- The DNS response that caused this exception.
public DnsClientException(String message, Exception inner) #Initializes a new instance of the DnsClientException class with a specified error message and inner exception.
Parameters
- message System.String
- Error message.
- inner System.Exception
- Underlying exception.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
public override Void GetObjectData(SerializationInfo info, StreamingContext context) #Returns:
VoidInherited from Exception
Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}") EditorBrowsable(1)Parameters
- info SerializationInfo
- context StreamingContext
Properties
public DnsResponse Response { get; set; } #Gets or sets the DNS response that caused this exception.
Inherited Properties
public MethodBase TargetSite { get; } #Inherited from Exception
public override String Message { get; } #Inherited from Exception
public override IDictionary Data { get; } #Inherited from Exception
public Exception InnerException { get; } #Inherited from Exception
public override String HelpLink { get; set; } #Inherited from Exception
public override String Source { get; set; } #Inherited from Exception
public override String StackTrace { get; } #Inherited from Exception