Skip to content
Permalink
Browse files

DnsException improvements #2493 (#2570)

Signed-off-by: KowalczykBartek <bkowalczyyk@gmail.com>
  • Loading branch information...
KowalczykBartek authored and vietj committed Aug 6, 2018
1 parent d64aebf commit 57d49c498d6db2816bfba9908c1aca9fecf34a7c
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/io/vertx/core/dns/DnsException.java
@@ -11,6 +11,7 @@

package io.vertx.core.dns;

import io.vertx.core.impl.NoStackTraceThrowable;
import java.util.Objects;

/**
@@ -19,11 +20,13 @@
*
* @author <a href="mailto:nmaurer@redhat.com">Norman Maurer</a>
*/
public final class DnsException extends Exception {
public final class DnsException extends NoStackTraceThrowable {

private static final String ERROR_MESSAGE_PREFIX = "DNS query error occurred: ";
private DnsResponseCode code;

public DnsException(DnsResponseCode code) {
super(ERROR_MESSAGE_PREFIX + code);
Objects.requireNonNull(code, "code");
this.code = code;
}

0 comments on commit 57d49c4

Please sign in to comment.
You can’t perform that action at this time.