Skip to content

Commit

Permalink
DnsException improvements #2493 (#2570)
Browse files Browse the repository at this point in the history
Signed-off-by: KowalczykBartek <bkowalczyyk@gmail.com>
  • Loading branch information
KowalczykBartek authored and vietj committed Aug 6, 2018
1 parent d64aebf commit 57d49c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/io/vertx/core/dns/DnsException.java
Expand Up @@ -11,6 +11,7 @@

package io.vertx.core.dns;

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

/**
Expand All @@ -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;
}
Expand Down

0 comments on commit 57d49c4

Please sign in to comment.