@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2021 Jonathan Schleifer + * Copyright (c) 2008-2022 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -19,23 +19,18 @@ #import "OFString.h" @implementation OFGetCurrentDirectoryPathFailedException @synthesize errNo = _errNo; -+ (instancetype)exception -{ - OF_UNRECOGNIZED_SELECTOR -} - + (instancetype)exceptionWithErrNo: (int)errNo { return [[[self alloc] initWithErrNo: errNo] autorelease]; } -- (instancetype)init ++ (instancetype)exception { - OF_INVALID_INIT_METHOD + OF_UNRECOGNIZED_SELECTOR } - (instancetype)initWithErrNo: (int)errNo { self = [super init]; @@ -42,13 +37,18 @@ _errNo = errNo; return self; } + +- (instancetype)init +{ + OF_INVALID_INIT_METHOD +} - (OFString *)description { return [OFString stringWithFormat: @"Getting the current directory path failed: %@", OFStrError(_errNo)]; } @end