@@ -18,35 +18,36 @@ #import "OFDeleteWindowsRegistryValueFailedException.h" #import "OFData.h" @implementation OFDeleteWindowsRegistryValueFailedException -@synthesize registryKey = _registryKey, value = _value, status = _status; +@synthesize registryKey = _registryKey, valueName = _valueName; +@synthesize status = _status; + (instancetype)exceptionWithRegistryKey: (OFWindowsRegistryKey *)registryKey - value: (OFString *)value + valueName: (OFString *)valueName status: (LSTATUS)status { return [[[self alloc] initWithRegistryKey: registryKey - value: value + valueName: valueName status: status] autorelease]; } - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)initWithRegistryKey: (OFWindowsRegistryKey *)registryKey - value: (OFString *)value + valueName: (OFString *)valueName status: (LSTATUS)status { self = [super init]; @try { _registryKey = [registryKey retain]; - _value = [value copy]; + _valueName = [valueName copy]; _status = status; } @catch (id e) { [self release]; @throw e; } @@ -55,17 +56,17 @@ } - (void)dealloc { [_registryKey release]; - [_value release]; + [_valueName release]; [super dealloc]; } - (OFString *)description { return [OFString stringWithFormat: - @"Failed to delete value %@: %@", - _value, of_windows_status_to_string(_status)]; + @"Failed to delete value named %@: %@", + _valueName, OFWindowsStatusToString(_status)]; } @end