@@ -22,20 +22,18 @@ #import "OFString.h" #import "common.h" @implementation OFCopyFileFailedException -+ (instancetype)exceptionWithClass: (Class)class - sourcePath: (OFString*)sourcePath - destinationPath: (OFString*)destinationPath ++ (instancetype)exceptionWithSourcePath: (OFString*)sourcePath + destinationPath: (OFString*)destinationPath { - return [[[self alloc] initWithClass: class - sourcePath: sourcePath - destinationPath: destinationPath] autorelease]; + return [[[self alloc] initWithSourcePath: sourcePath + destinationPath: destinationPath] autorelease]; } -- initWithClass: (Class)class +- init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @@ -43,15 +41,14 @@ } abort(); } -- initWithClass: (Class)class - sourcePath: (OFString*)sourcePath - destinationPath: (OFString*)destinationPath +- initWithSourcePath: (OFString*)sourcePath + destinationPath: (OFString*)destinationPath { - self = [super initWithClass: class]; + self = [super init]; @try { _sourcePath = [sourcePath copy]; _destinationPath = [destinationPath copy]; _errNo = GET_ERRNO; @@ -72,17 +69,12 @@ } - (OFString*)description { return [OFString stringWithFormat: - @"Failed to copy file %@ to %@ in class %@! " ERRFMT, - _sourcePath, _destinationPath, _inClass, ERRPARAM]; -} - -- (int)errNo -{ - return _errNo; + @"Failed to copy file %@ to %@! " ERRFMT, _sourcePath, + _destinationPath, ERRPARAM]; } - (OFString*)sourcePath { OF_GETTER(_sourcePath, false) @@ -90,6 +82,11 @@ - (OFString*)destinationPath { OF_GETTER(_destinationPath, false) } + +- (int)errNo +{ + return _errNo; +} @end