ObjFW  Diff

Differences From Artifact [20ad317438]:

To Artifact [8c5ce69b79]:


12
13
14
15
16
17
18


19


20
21
22
23
24
25
26
27
28
29



30
31
32
33
34
35
36
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * 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;



}

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

/*!







>
>

>
>










>
>
>







12
13
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
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"

#define OF_EXCEPTION_MAX_BACKTRACE_SIZE 32

@class OFString;
@class OFArray;
@class OFMutableArray;

/*!
 * @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;
	OFMutableArray *_backtrace;
	void *_backtraceBuffer[OF_EXCEPTION_MAX_BACKTRACE_SIZE];
	int _backtraceSize;
}

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

/*!
58
59
60
61
62
63
64








65

/*!
 * @brief Returns a description of the exception.
 *
 * @return A description of the exception
 */
- (OFString*)description;








@end







>
>
>
>
>
>
>
>

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

/*!
 * @brief Returns a description of the exception.
 *
 * @return A description of the exception
 */
- (OFString*)description;

/*!
 * @brief Returns a backtrace of when the exception was created or nil if no
 *	  backtrace is available.
 *
 * @return A backtrace of when the exception was created
 */
- (OFArray*)backtrace;
@end