Revision: 4057
http://skim-app.svn.sourceforge.net/skim-app/?rev=4057&view=rev
Author: hofman
Date: 2008-06-23 02:07:38 -0700 (Mon, 23 Jun 2008)
Log Message:
-----------
Use a single error message for failing to find attribute fragments. Log more
detailed info, this should never happen anyway.
Modified Paths:
--------------
trunk/SkimNotes/SKNExtendedAttributeManager.m
Modified: trunk/SkimNotes/SKNExtendedAttributeManager.m
===================================================================
--- trunk/SkimNotes/SKNExtendedAttributeManager.m 2008-06-23 08:56:56 UTC
(rev 4056)
+++ trunk/SkimNotes/SKNExtendedAttributeManager.m 2008-06-23 09:07:38 UTC
(rev 4057)
@@ -250,15 +250,15 @@
NSData *subdata;
BOOL success = (nil != uniqueValue && numberOfFragments > 0);
- // somewhat generic error message here; include failing key?
- if (NO == success && NULL != error) *error = [NSError
errorWithDomain:SKNErrorDomain code:0 userInfo:[NSDictionary
dictionaryWithObjectsAndKeys:path, NSFilePathErrorKey,
SKNLocalizedString(@"Failed to read key from property list.", @"Error
description"), NSLocalizedDescriptionKey, nil]];
+ if (success == NO)
+ NSLog(@"failed to read unique key %@ from property list.",
uniqueKey);
// reassemble the original data object
for (i = 0; success && i < numberOfFragments; i++) {
name = [NSString stringWithFormat:@"[EMAIL PROTECTED]",
uniqueValue, i];
subdata = [self extendedAttributeNamed:name atPath:path
traverseLink:follow error:error];
if (nil == subdata) {
- if (NULL != error) *error = [NSError
errorWithDomain:SKNErrorDomain code:0 userInfo:[NSDictionary
dictionaryWithObjectsAndKeys:path, NSFilePathErrorKey,
SKNLocalizedString(@"Failed to reassemble attribute value.", @"Error
description"), NSLocalizedDescriptionKey, nil]];
+ NSLog(@"failed to find subattribute %@ of attribute named %@",
name, attr);
success = NO;
} else {
[buffer appendData:subdata];
@@ -267,6 +267,8 @@
[attribute release];
attribute = success ? [[self bunzip2Data:buffer] retain] : nil;
+
+ if (success == NO && NULL != error) *error = [NSError
errorWithDomain:SKNErrorDomain code:0 userInfo:[NSDictionary
dictionaryWithObjectsAndKeys:path, NSFilePathErrorKey,
SKNLocalizedString(@"Failed to reassemble attribute value.", @"Error
description"), NSLocalizedDescriptionKey, nil]];
}
return [attribute autorelease];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit