[51689] branches/gsoc09-gui/MacPorts_Framework/MPPort.m

juanger at macports.org juanger at macports.org
Sun May 31 11:08:48 PDT 2009


Revision: 51689
          http://trac.macports.org/changeset/51689
Author:   juanger at macports.org
Date:     2009-05-31 11:08:48 -0700 (Sun, 31 May 2009)
Log Message:
-----------
Bugfix: Description's and long description's erros are now catch separately.

Modified Paths:
--------------
    branches/gsoc09-gui/MacPorts_Framework/MPPort.m

Modified: branches/gsoc09-gui/MacPorts_Framework/MPPort.m
===================================================================
--- branches/gsoc09-gui/MacPorts_Framework/MPPort.m	2009-05-31 18:06:53 UTC (rev 51688)
+++ branches/gsoc09-gui/MacPorts_Framework/MPPort.m	2009-05-31 18:08:48 UTC (rev 51689)
@@ -122,6 +122,18 @@
 		if ([[self valueForKey:@"description"] characterAtIndex:0] == '{') {
 			[self setValue:[self valueForKey:@"description"] forKey:@"description"];
 		}
+	} 
+	@catch (NSException *e) {
+		[self setValue:[NSString stringWithFormat:
+						NSLocalizedStringWithDefaultValue(@"setPortWithTclListAsStringDescreiptionError",
+														  @"Localizable",
+														  [NSBundle mainBundle],
+														  @"Port has an invalid desciption key.",
+														  @"Error statement for exception raised when testing description.")]
+				forKey:@"description"];
+	}
+	
+	@try {
 		if ([[self valueForKey:@"long_description"] characterAtIndex:0] == '{') {
 			[self setValue:[self valueForKey:@"long_description"] forKey:@"long_description"];
 		}
@@ -131,7 +143,7 @@
 						NSLocalizedStringWithDefaultValue(@"setPortWithTclListAsStringDescreiptionError",
 														  @"Localizable",
 														  [NSBundle mainBundle],
-														  @"Port has an invalid desciption or long_description key.",
+														  @"Port has an invalid long_description key.",
 														  @"Error statement for exception raised when testing long_description.")]
 				forKey:@"long_description"];
 	}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090531/3a5c8ad4/attachment-0001.html>


More information about the macports-changes mailing list