catch exception

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25722 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-12-11 14:23:04 +00:00
parent aba85084b7
commit 6146c2dcca
2 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-12-11 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSUserDefaults.m: catch any exception if som eone breaks our
lock on the defaults file.
2007-12-11 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSIndexSet.m: Test and debug ([-initWithCoder:])

View file

@ -1456,7 +1456,17 @@ static BOOL isLocked = NO;
- (void) unlockDefaultsFile
{
[_fileLock unlock];
NS_DURING
{
[_fileLock unlock];
}
NS_HANDLER
{
NSLog(@"Warning ... someone broke our lock (%@) ... and may have"
@" interfered with updating defaults data in file.",
[_defaultsDatabase stringByAppendingPathExtension: @"lck"]);
}
NS_ENDHANDLER
isLocked = NO;
}