Commit b3ebe75 1 parent 8fa00a9 commit b3ebe75 Copy full SHA for b3ebe75
File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -259,13 +259,23 @@ - (void)generateWithDestinationPath:(NSString *)destPath parserName:(NSString *)
259
259
NSString *path = [[NSString stringWithFormat: @" %@ /%@ .h" , destPath, className] stringByExpandingTildeInPath ];
260
260
err = nil ;
261
261
if (![_visitor.interfaceOutputString writeToFile: path atomically: YES encoding: NSUTF8StringEncoding error: &err]) {
262
- NSLog (@" %@ " , err);
262
+ NSMutableString *str = [NSMutableString stringWithString: [err localizedFailureReason ]];
263
+ [str appendFormat: @" \n\n %@ " , [path stringByDeletingLastPathComponent ]];
264
+ id dict = [NSMutableDictionary dictionaryWithDictionary: [err userInfo ]];
265
+ dict[NSLocalizedFailureReasonErrorKey ] = str;
266
+ self.error = [NSError errorWithDomain: [err domain ] code: [err code ] userInfo: dict];
267
+ goto done;
263
268
}
264
269
265
270
path = [[NSString stringWithFormat: @" %@ /%@ .m" , destPath, className] stringByExpandingTildeInPath ];
266
271
err = nil ;
267
272
if (![_visitor.implementationOutputString writeToFile: path atomically: YES encoding: NSUTF8StringEncoding error: &err]) {
268
- NSLog (@" %@ " , err);
273
+ NSMutableString *str = [NSMutableString stringWithString: [err localizedFailureReason ]];
274
+ [str appendFormat: @" \n\n %@ " , [path stringByDeletingLastPathComponent ]];
275
+ id dict = [NSMutableDictionary dictionaryWithDictionary: [err userInfo ]];
276
+ dict[NSLocalizedFailureReasonErrorKey ] = str;
277
+ self.error = [NSError errorWithDomain: [err domain ] code: [err code ] userInfo: dict];
278
+ goto done;
269
279
}
270
280
271
281
done:
You can’t perform that action at this time.
0 commit comments