ObjFW
Loading...
Searching...
No Matches
OFUndefinedKeyException.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This file is part of ObjFW. It may be distributed under the terms of the
7 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8 * the packaging of this file.
9 *
10 * Alternatively, it may be distributed under the terms of the GNU General
11 * Public License, either version 2 or 3, which can be found in the file
12 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13 * file.
14 */
15
16#import "OFException.h"
17
18OF_ASSUME_NONNULL_BEGIN
19
28{
29 id _object;
30 OFString *_Nullable _key;
31 id _Nullable _value;
32 OF_RESERVE_IVARS(OFUndefinedKeyException, 4)
33}
34
38@property (readonly, nonatomic) id object;
39
43@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *key;
44
48@property OF_NULLABLE_PROPERTY (readonly, nonatomic) id value;
49
58+ (instancetype)exceptionWithObject: (id)object key: (OFString *)key;
59
69+ (instancetype)exceptionWithObject: (id)object
70 key: (nullable OFString *)key
71 value: (nullable id)value;
72
73+ (instancetype)exception OF_UNAVAILABLE;
74
83- (instancetype)initWithObject: (id)object key: (OFString *)key;
84
94- (instancetype)initWithObject: (id)object
95 key: (nullable OFString *)key
96 value: (nullable id)value OF_DESIGNATED_INITIALIZER;
97
98- (instancetype)init OF_UNAVAILABLE;
99@end
100
101OF_ASSUME_NONNULL_END
The base class for all exceptions in ObjFW.
Definition OFException.h:151
A class for handling strings.
Definition OFString.h:135
An exception indicating that a key is undefined (e.g. for Key Value Coding).
Definition OFUndefinedKeyException.h:28
OFString * key
The key which is undefined.
Definition OFUndefinedKeyException.h:43