ObjFW  Diff

Differences From Artifact [1070cfb5a4]:

To Artifact [aebf101d61]:


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 * file.
 */

#import "OFObject.h"

@class OFString;

/**
 * \brief The base class for all exceptions in ObjFW
 *
 * The OFException class is the base class for all exceptions in ObjFW, except
 * the OFAllocFailedException.
 */
@interface OFException: OFObject
{
	Class inClass;
	OFString *description;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly) Class inClass;
#endif

/**
 * Creates a new exception.
 *
 * \param class_ The class of the object which caused the exception
 * \return A new exception
 */
+ (instancetype)exceptionWithClass: (Class)class_;

/**
 * Initializes an already allocated OFException.
 *
 * \param class_ The class of the object which caused the exception
 * \return An initialized OFException
 */
- initWithClass: (Class)class_;

/**
 * \return The class of the object in which the exception happened
 */
- (Class)inClass;

/**
 * \return A description of the exception
 */
- (OFString*)description;
@end







|
|














|


|
|



|


|
|



|
|



|
|



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 * file.
 */

#import "OFObject.h"

@class OFString;

/*!
 * @brief The base class for all exceptions in ObjFW
 *
 * The OFException class is the base class for all exceptions in ObjFW, except
 * the OFAllocFailedException.
 */
@interface OFException: OFObject
{
	Class inClass;
	OFString *description;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly) Class inClass;
#endif

/*!
 * Creates a new exception.
 *
 * @param class_ The class of the object which caused the exception
 * @return A new exception
 */
+ (instancetype)exceptionWithClass: (Class)class_;

/*!
 * Initializes an already allocated OFException.
 *
 * @param class_ The class of the object which caused the exception
 * @return An initialized OFException
 */
- initWithClass: (Class)class_;

/*!
 * @return The class of the object in which the exception happened
 */
- (Class)inClass;

/*!
 * @return A description of the exception
 */
- (OFString*)description;
@end