From: <ama...@us...> - 2007-04-17 18:59:13
|
Revision: 10474 http://svn.sourceforge.net/bibdesk/?rev=10474&view=rev Author: amaxwell Date: 2007-04-17 11:59:14 -0700 (Tue, 17 Apr 2007) Log Message: ----------- Actually use error string returned by reference from abstract/annote function. Modified Paths: -------------- trunk/bibdesk/BibTeXParser.m Modified: trunk/bibdesk/BibTeXParser.m =================================================================== --- trunk/bibdesk/BibTeXParser.m 2007-04-17 17:39:31 UTC (rev 10473) +++ trunk/bibdesk/BibTeXParser.m 2007-04-17 18:59:14 UTC (rev 10474) @@ -892,7 +892,7 @@ } if (lengthOverrun) { if (errorString) - *errorString = [NSString stringWithFormat:@"Unbalanced braces in at line %d", field->line]; + *errorString = [NSString stringWithFormat:@"Unbalanced delimiters at line %d (%s)", field->line, field->down->text]; returnString = nil; } else { returnString = [[NSString alloc] initWithBytes:&data[field->down->offset] length:(cidx- (field->down->offset)) encoding:encoding]; @@ -933,8 +933,7 @@ // this can happen with badly formed annote/abstract fields, and leads to data loss if(nil == tmpStr){ hadProblems = YES; - NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Syntax error in \"%@\"", @"Error description"), tmpStr]; - [BDSKErrorObject reportError:message forFile:filePath line:field->line]; + [BDSKErrorObject reportError:errorString forFile:filePath line:field->line]; } else { // this returns nil in case of a syntax error; it isn't an encoding failure This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |