ObjFW  Diff

Differences From Artifact [039a0e8d07]:

To Artifact [a8e30d777d]:


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




44
45
46
47


48
49
50
51
52
53
54
55





56
57
58
59
60
61




62
63
64





65
66
67
68
69
70
71
72
73






74
75
76
77
78
79
80
#import <stddef.h>
#import "OFObject.h"

// FIXME: Exceptions should include which type of error occoured (fopen etc.)

@interface OFException: OFObject
{

	char *errstr;
}

+ newWithObject: (id)obj;
- initWithObject: (id)obj;
- free;
- raise;
- (char*)string;
@end

@interface OFNoMemException: OFException




+ newWithObject: (id)obj
	andSize: (size_t)size;
- initWithObject: (id)obj
	 andSize: (size_t)size;


@end

@interface OFNotImplementedException: OFException




+ newWithObject: (id)obj
    andSelector: (SEL)sel;
- initWithObject: (id)obj
     andSelector: (SEL)sel;


@end

@interface OFMemNotPartOfObjException: OFException




+ newWithObject: (id)obj
     andPointer: (void*)ptr;
- initWithObject: (id)obj
      andPointer: (void*)ptr;


@end

@interface OFOverflowException: OFException
+ newWithObject: (id)obj;
- initWithObject: (id)obj;
@end

@interface OFOpenFileFailedException: OFException





+ newWithObject: (id)obj
	andPath: (const char*)path
	andMode: (const char*)mode;
- initWithObject: (id)obj
	 andPath: (const char*)path
	 andMode: (const char*)mode;




@end

@interface OFReadOrWriteFailedException: OFException





+ newWithObject: (id)obj
	andSize: (size_t)size
      andNItems: (size_t)nitems;
@end

@interface OFReadFailedException: OFReadOrWriteFailedException
- initWithObject: (id)obj
	 andSize: (size_t)size
       andNItems: (size_t)nitems;






@end

@interface OFWriteFailedException: OFReadOrWriteFailedException
- initWithObject: (id)obj
	 andSize: (size_t)size
       andNItems: (size_t)nitems;
@end







>
|






|



>
>
>
>




>
>



>
>
>
>




>
>



>
>
>
>




>
>








>
>
>
>
>

|
|

|
|
>
>
>
>



>
>
>
>
>



<
<
<



>
>
>
>
>
>



|
<
<

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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100



101
102
103
104
105
106
107
108
109
110
111
112
113


114
#import <stddef.h>
#import "OFObject.h"

// FIXME: Exceptions should include which type of error occoured (fopen etc.)

@interface OFException: OFObject
{
	id   object;
	char *string;
}

+ newWithObject: (id)obj;
- initWithObject: (id)obj;
- free;
- raise;
- (char*)cString;
@end

@interface OFNoMemException: OFException
{
	size_t req_size;
}

+ newWithObject: (id)obj
	andSize: (size_t)size;
- initWithObject: (id)obj
	 andSize: (size_t)size;
- (char*)cString;
- (size_t)requestedSize;
@end

@interface OFNotImplementedException: OFException
{
	SEL selector;
}

+ newWithObject: (id)obj
    andSelector: (SEL)sel;
- initWithObject: (id)obj
     andSelector: (SEL)sel;
- (char*)cString;
- (SEL)selector;
@end

@interface OFMemNotPartOfObjException: OFException
{
	void *pointer;
}

+ newWithObject: (id)obj
     andPointer: (void*)ptr;
- initWithObject: (id)obj
      andPointer: (void*)ptr;
- (char*)cString;
- (void*)pointer;
@end

@interface OFOverflowException: OFException
+ newWithObject: (id)obj;
- initWithObject: (id)obj;
@end

@interface OFOpenFileFailedException: OFException
{
	char *path;
	char *mode;
}

+ newWithObject: (id)obj
	andPath: (const char*)p
	andMode: (const char*)m;
- initWithObject: (id)obj
	 andPath: (const char*)p
	 andMode: (const char*)m;
- free;
- (char*)cString;
- (char*)path;
- (char*)mode;
@end

@interface OFReadOrWriteFailedException: OFException
{
	size_t req_size;
	size_t req_items;
}

+ newWithObject: (id)obj
	andSize: (size_t)size
      andNItems: (size_t)nitems;



- initWithObject: (id)obj
	 andSize: (size_t)size
       andNItems: (size_t)nitems;
- (size_t)requestedSize;
- (size_t)requestedItems;
@end

@interface OFReadFailedException: OFReadOrWriteFailedException
- (char*)cString;
@end

@interface OFWriteFailedException: OFReadOrWriteFailedException
- (char*)cString;


@end