@@ -12,12 +12,10 @@ * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ -#include - #import "OFException.h" #ifndef OF_HAVE_SOCKETS # error No sockets available! #endif @@ -30,16 +28,15 @@ * @brief An exception indicating the translation of an address failed. */ @interface OFAddressTranslationFailedException: OFException { OFString *_host; - int _errNo; + int _error; } #ifdef OF_HAVE_PROPERTIES @property (readonly, copy) OFString *host; -@property (readonly) int errNo; #endif /*! * @brief Creates a new, autoreleased address translation failed exception. * @@ -46,27 +43,28 @@ * @param host The host for which translation was requested * @return A new, autoreleased address translation failed exception */ + (instancetype)exceptionWithHost: (OFString*)host; ++ (instancetype)exceptionWithHost: (OFString*)host + error: (int)error; ++ (instancetype)exceptionWithError: (int)error; + /*! * @brief Initializes an already allocated address translation failed exception. * * @param host The host for which translation was requested * @return An initialized address translation failed exception */ - initWithHost: (OFString*)host; +- initWithHost: (OFString*)host + error: (int)error; +- initWithError: (int)error; + /*! * @brief Returns the host for which the address translation was requested. * * @return The host for which the address translation was requested */ - (OFString*)host; - -/*! - * @brief Returns the errno from when the exception was created. - * - * @return The errno from when the exception was created - */ -- (int)errNo; @end