mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Improve error message
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39884 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c3b5fd3e65
commit
78097d25b0
1 changed files with 8 additions and 3 deletions
|
@ -1494,7 +1494,8 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
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 @@ GSICUCollatorOpen(NSStringCompareOptions mask, NSLocale *locale)
|
|||
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 @@ static NSFileManager *fm = nil;
|
|||
}
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue