diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-09-02 12:01:30 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-09-02 12:01:30 +0200 |
commit | 34682b0b087a9ced1f23a91f67167f71f304a4a8 (patch) | |
tree | 70ef9e0a697a3fdfa194ce4819d55ce2b36fc8af /MLKListenerController.m | |
parent | 84597fcf74fc74672fe664456e62ec6be5f2b066 (diff) |
Switch from NS_DURING..NS_HANDLER..NS_ENDHANDLER to @try..@catch..@finally.
Diffstat (limited to 'MLKListenerController.m')
-rw-r--r-- | MLKListenerController.m | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/MLKListenerController.m b/MLKListenerController.m index 2998ab2..9e8ddee 100644 --- a/MLKListenerController.m +++ b/MLKListenerController.m @@ -51,11 +51,11 @@ [submitButton setEnabled:NO]; - NS_DURING + @try { object = [MLKReader readFromString:input]; } - NS_HANDLER + @catch (NSException *e) { // A parsing error. Beep and let the user try again. // XXX Maybe the status line could be made to provide more information on the error. @@ -64,7 +64,6 @@ [inputField selectText:self]; return; } - NS_ENDHANDLER; [inputField setStringValue:@""]; [inputField selectText:self]; @@ -119,7 +118,7 @@ object = denullify(object); - NS_DURING + @try { int i; NSArray *results; @@ -167,7 +166,7 @@ waitUntilDone:waitp]; } } - NS_HANDLER + @catch (NSException *localException) { NSString *bare_msg = [NSString stringWithFormat: @"Caught an unhandled exception.\nName: %s\nReason: %s\n", @@ -187,7 +186,6 @@ withObject:response waitUntilDone:waitp]; } - NS_ENDHANDLER; [MLKDynamicContext popContext]; LDESTROY (newctx); |