Differences From Artifact [aa5a117197]:
- File
src/OFExceptions.m
— part of check-in
[e47ad44290]
at
2008-10-22 13:32:19
on branch trunk
— Reworked OFObject and added append(Wide)CString to OFString.
The reworked OFObject lets one test fail on the GNU runtime.
Unfortunately, I have no idea why... (user: js, size: 3930) [annotate] [blame] [check-ins using]
To Artifact [2ecf3b040e]:
- File src/OFExceptions.m — part of check-in [0340b72d43] at 2008-10-25 23:53:55 on branch trunk — Allow OFNoMemException and OFOverflowException to have obj == nil. (user: js, size: 4201) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 | */ #import "config.h" #define _GNU_SOURCE #import <stdio.h> #import <stdlib.h> #import <objc/objc-api.h> #import "OFExceptions.h" #if defined HAVE_SEL_GET_NAME #define SEL_NAME(x) sel_get_name(x) | > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | */ #import "config.h" #define _GNU_SOURCE #import <stdio.h> #import <stdlib.h> #import <string.h> #import <objc/objc-api.h> #import "OFExceptions.h" #if defined HAVE_SEL_GET_NAME #define SEL_NAME(x) sel_get_name(x) |
︙ | ︙ | |||
65 66 67 68 69 70 71 | return [[OFNoMemException alloc] initWithObject: obj andSize: size]; } - initWithObject: (id)obj andSize: (size_t)size { | | > | | > > > > | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | return [[OFNoMemException alloc] initWithObject: obj andSize: size]; } - initWithObject: (id)obj andSize: (size_t)size { if ((self = [super init])) { if (obj != nil) asprintf(&errstr, "ERROR: Could not allocate %zu bytes " "for object of class %s!\n", size, [obj name]); else asprintf(&errstr, "ERROR: Could not allocate %zu bytes " "for object of class (null)!\n", size); } return self; } @end @implementation OFNotImplementedException + newWithObject: (id)obj |
︙ | ︙ | |||
123 124 125 126 127 128 129 | + newWithObject: (id)obj { return [[OFOverflowException alloc] initWithObject: obj]; } - initWithObject: (id)obj { | | > | | > > > > | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | + newWithObject: (id)obj { return [[OFOverflowException alloc] initWithObject: obj]; } - initWithObject: (id)obj { if ((self = [super init])) { if (obj != nil) asprintf(&errstr, "ERROR: Overflow in object of class " "%s!\n", [obj name]); else errstr = strdup("ERROR: Overflow in object of class " "(null)!\n"); } return self; } @end @implementation OFOpenFileFailedException + newWithObject: (id)obj |
︙ | ︙ |