mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-20 14:17:32 +00:00
(-loadBindingsFromFile:): Handle errors directly instead of using (broken) exception handling code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18059 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fed935717b
commit
ca2773de30
2 changed files with 12 additions and 13 deletions
|
@ -292,23 +292,17 @@ static NSInputManager *currentInputManager = nil;
|
|||
|
||||
- (void) loadBindingsFromFile: (NSString *)fullPath
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
NSDictionary *bindings;
|
||||
NSDictionary *bindings;
|
||||
|
||||
bindings = [NSDictionary dictionaryWithContentsOfFile: fullPath];
|
||||
if (bindings == nil)
|
||||
{
|
||||
[NSException raise];
|
||||
}
|
||||
|
||||
[_rootBindingTable loadBindingsFromDictionary: bindings];
|
||||
}
|
||||
NS_HANDLER
|
||||
bindings = [NSDictionary dictionaryWithContentsOfFile: fullPath];
|
||||
if (bindings == nil)
|
||||
{
|
||||
NSLog (@"Unable to load KeyBindings from file %@", fullPath);
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
else
|
||||
{
|
||||
[_rootBindingTable loadBindingsFromDictionary: bindings];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) loadBindingsWithName: (NSString *)fileName
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue