@@ -28,17 +28,10 @@ OF_UNRECOGNIZED_SELECTOR } + (instancetype)exceptionWithSourcePath: (OFString *)sourcePath destinationPath: (OFString *)destinationPath -{ - return [[[self alloc] initWithSourcePath: sourcePath - destinationPath: destinationPath] autorelease]; -} - -+ (instancetype)exceptionWithSourcePath: (OFString *)sourcePath - destinationPath: (OFString *)destinationPath errNo: (int)errNo { return [[[self alloc] initWithSourcePath: sourcePath destinationPath: destinationPath errNo: errNo] autorelease]; @@ -47,18 +40,10 @@ - init { OF_INVALID_INIT_METHOD } -- initWithSourcePath: (OFString *)sourcePath - destinationPath: (OFString *)destinationPath -{ - return [self initWithSourcePath: sourcePath - destinationPath: destinationPath - errNo: 0]; -} - - initWithSourcePath: (OFString *)sourcePath destinationPath: (OFString *)destinationPath errNo: (int)errNo { self = [super init]; @@ -83,16 +68,10 @@ [super dealloc]; } - (OFString *)description { - if (_errNo != 0) - return [OFString stringWithFormat: - @"Failed to create symbolic link %@ with destination " - @"%@: %@", _destinationPath, _sourcePath, - of_strerror(_errNo)]; - else - return [OFString stringWithFormat: - @"Failed to create symbolic link %@ with destination %@!", - _destinationPath, _sourcePath]; + return [OFString stringWithFormat: + @"Failed to create symbolic link %@ with destination %@: %@", + _destinationPath, _sourcePath, of_strerror(_errNo)]; } @end