@@ -22,18 +22,16 @@ #import "OFString.h" #import "common.h" @implementation OFCreateDirectoryFailedException -+ (instancetype)exceptionWithClass: (Class)class - path: (OFString*)path ++ (instancetype)exceptionWithPath: (OFString*)path { - return [[[self alloc] initWithClass: class - path: path] autorelease]; + return [[[self alloc] initWithPath: path] autorelease]; } -- initWithClass: (Class)class +- init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @@ -41,14 +39,13 @@ } abort(); } -- initWithClass: (Class)class - path: (OFString*)path +- initWithPath: (OFString*)path { - self = [super initWithClass: class]; + self = [super init]; @try { _path = [path copy]; _errNo = GET_ERRNO; } @catch (id e) { @@ -67,19 +64,18 @@ } - (OFString*)description { return [OFString stringWithFormat: - @"Failed to create directory %@ in class %@! " ERRFMT, _path, - _inClass, ERRPARAM]; + @"Failed to create directory %@! " ERRFMT, _path, ERRPARAM]; +} + +- (OFString*)path +{ + OF_GETTER(_path, false) } - (int)errNo { return _errNo; } - -- (OFString*)path -{ - OF_GETTER(_path, false) -} @end