ObjFW
Loading...
Searching...
No Matches
OFDNSQueryFailedException.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20#import "OFException.h"
21#import "OFDNSQuery.h"
22#import "OFDNSResolver.h"
24
25OF_ASSUME_NONNULL_BEGIN
26
34{
35 OFDNSQuery *_query;
36 OFDNSResolverErrorCode _errorCode;
37 OF_RESERVE_IVARS(OFDNSQueryFailedException, 4)
38}
39
43@property (readonly, nonatomic) OFDNSQuery *query;
44
48@property (readonly, nonatomic) OFDNSResolverErrorCode errorCode;
49
57+ (instancetype)exceptionWithQuery: (OFDNSQuery *)query
58 errorCode: (OFDNSResolverErrorCode)errorCode;
59
60+ (instancetype)exception OF_UNAVAILABLE;
61
69- (instancetype)initWithQuery: (OFDNSQuery *)query
70 errorCode: (OFDNSResolverErrorCode)errorCode;
71
72- (instancetype)init OF_UNAVAILABLE;
73@end
74
75#ifdef __cplusplus
76extern "C" {
77#endif
78extern OFString *OFDNSResolverErrorCodeDescription(
79 OFDNSResolverErrorCode errorCode);
80#ifdef __cplusplus
81}
82#endif
83
84OF_ASSUME_NONNULL_END
An exception indicating that a DNS query failed.
Definition OFDNSQueryFailedException.h:34
A class representing a DNS query.
Definition OFDNSQuery.h:35
The base class for all exceptions in ObjFW.
Definition OFException.h:155
A class for handling strings.
Definition OFString.h:139