1/*
2 * Copyright 2015-2022 the original author or authors
3 *
4 * This software is licensed under the Apache License, Version 2.0,
5 * the GNU Lesser General Public License version 2 or later ("LGPL")
6 * and the WTFPL.
7 * You may choose either license to govern your use of this software only
8 * upon the condition that you accept all of the terms of either
9 * the Apache License 2.0, the LGPL 2.1+ or the WTFPL.
10 */
11package de.gultsch.minidns;
12
13import org.minidns.MiniDnsException;
14import org.minidns.dnsmessage.Question;
15import org.minidns.dnsmessage.DnsMessage.RESPONSE_CODE;
16
17import java.io.Serial;
18
19public class ResolutionUnsuccessfulException extends MiniDnsException {
20
21 /**
22 *
23 */
24 @Serial
25 private static final long serialVersionUID = 1L;
26
27 public final Question question;
28 public final RESPONSE_CODE responseCode;
29
30 public ResolutionUnsuccessfulException(Question question, RESPONSE_CODE responseCode) {
31 super("Asking for " + question + " yielded an error response " + responseCode);
32 this.question = question;
33 this.responseCode = responseCode;
34 }
35}