001/* 002 * Copyright 2015-2024 the original author or authors 003 * 004 * This software is licensed under the Apache License, Version 2.0, 005 * the GNU Lesser General Public License version 2 or later ("LGPL") 006 * and the WTFPL. 007 * You may choose either license to govern your use of this software only 008 * upon the condition that you accept all of the terms of either 009 * the Apache License 2.0, the LGPL 2.1+ or the WTFPL. 010 */ 011package org.minidns.hla; 012 013import org.minidns.MiniDnsException; 014import org.minidns.dnsmessage.Question; 015import org.minidns.dnsmessage.DnsMessage.RESPONSE_CODE; 016 017public class ResolutionUnsuccessfulException extends MiniDnsException { 018 019 /** 020 * 021 */ 022 private static final long serialVersionUID = 1L; 023 024 public final Question question; 025 public final RESPONSE_CODE responseCode; 026 027 public ResolutionUnsuccessfulException(Question question, RESPONSE_CODE responseCode) { 028 super("Asking for " + question + " yielded an error response " + responseCode); 029 this.question = question; 030 this.responseCode = responseCode; 031 } 032}