Author: rfm Date: Mon Jun 20 08:38:05 2016 New Revision: 39884 URL: http://svn.gna.org/viewcvs/gnustep?rev=39884&view=rev Log: Improve error message
Modified: libs/base/trunk/Source/NSString.m Modified: libs/base/trunk/Source/NSString.m URL: http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSString.m?rev=39884&r1=39883&r2=39884&view=diff ============================================================================== --- libs/base/trunk/Source/NSString.m (original) +++ libs/base/trunk/Source/NSString.m Mon Jun 20 08:38:05 2016 @@ -1494,7 +1494,8 @@ RELEASE(d); if (self == nil) { - NSWarnMLog(@"Contents of file '%@' are not string data", path); + NSWarnMLog(@"Contents of file '%@' are not string data using %@", + path, [NSString localizedNameOfStringEncoding: enc]); } return self; } @@ -1667,7 +1668,8 @@ self = [self initWithData: d encoding: enc]; if (self == nil) { - NSWarnMLog(@"Contents of URL '%@' are not string data", url); + NSWarnMLog(@"Contents of URL '%@' are not string data using %@", + url, [NSString localizedNameOfStringEncoding: enc]); } return self; } @@ -6033,13 +6035,16 @@ } NS_HANDLER { + error = [NSString stringWithFormat: + @"as property list {%@}, and as strings file {%@}", + error, [localException reason]]; result = nil; } NS_ENDHANDLER if (result == nil) { [NSException raise: NSGenericException - format: @"Parse failed - %@", error]; + format: @"Parse failed - %@", error]; } } return result; _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs