@@ -19,25 +19,28 @@ #import "OFData.h" #import "OFString.h" @implementation OFBindDDPSocketFailedException @synthesize network = _network, node = _node, port = _port; +@synthesize protocolType = _protocolType; + (instancetype)exceptionWithSocket: (id)sock errNo: (int)errNo { OF_UNRECOGNIZED_SELECTOR } + (instancetype)exceptionWithNetwork: (uint16_t)network node: (uint8_t)node port: (uint8_t)port + protocolType: (uint8_t)protocolType socket: (id)sock errNo: (int)errNo { return [[[self alloc] initWithNetwork: network node: node port: port + protocolType: protocolType socket: sock errNo: errNo] autorelease]; } - (instancetype)initWithSocket: (id)sock errNo: (int)errNo @@ -46,19 +49,21 @@ } - (instancetype)initWithNetwork: (uint16_t)network node: (uint8_t)node port: (uint8_t)port + protocolType: (uint8_t)protocolType socket: (id)sock errNo: (int)errNo { self = [super initWithSocket: sock errNo: errNo]; @try { _network = network; _node = node; _port = port; + _protocolType = protocolType; } @catch (id e) { [self release]; @throw e; } @@ -67,9 +72,11 @@ - (OFString *)description { return [OFString stringWithFormat: @"Binding to port %" @PRIx8 @" of node %" @PRIx8 @" on network " - @"%" PRIx16 @" failed in socket of type %@: %@", - _port, _node, _network, [_socket class], OFStrError(_errNo)]; + @"%" PRIx16 @" with protocol type " @PRIx8 @" failed in socket of " + @"type %@: %@", + _port, _node, _network, _protocolType, [_socket class], + OFStrError(_errNo)]; } @end