Changeset 436 for trunk/ICeCoffEE
- Timestamp:
- 03/05/08 03:01:09 (17 years ago)
- Location:
- trunk/ICeCoffEE/ICeCoffEE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ICeCoffEE/ICeCoffEE/ICeCoffEE.m
r435 r436 153 153 Handle h = NULL; 154 154 155 NS_DURING155 @try { 156 156 h = NewHandle(len); 157 157 if (h == NULL) … … 174 174 err = ICCF_DoURLAction(ICCF_GetInst(), hint, *h, selStart, selEnd, action); 175 175 ICCF_OSErrCAssert(err, @"ICCF_DoURLAction"); 176 177 NS_HANDLER 176 } @finally { 178 177 DisposeHandle(h); 179 178 [urlString release]; 180 [localException raise]; 181 NS_ENDHANDLER 182 183 DisposeHandle(h); 184 [urlString release]; 179 } 185 180 186 181 return (err == noErr); … … 213 208 NSColor *insertionPointColor = [self insertionPointColor]; 214 209 215 NS_DURING 216 210 @try { 217 211 NSString *s = [[self textStorage] string]; // according to the class documentation, sending 'string' is guaranteed to be O(1) 218 212 unsigned length = [s length]; … … 260 254 } 261 255 } 262 263 NS_HANDLER 264 ICCF_HandleException(localException, triggeringEvent); 265 NS_ENDHANDLER 256 } @catch (NSException *e) { 257 ICCF_HandleException(e, triggeringEvent); 258 } 266 259 267 260 ICCF_StopIC(); -
trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEParser.m
r388 r436 73 73 NSCAssert(selEnd == [string length], @"Internal error: URL string is wrong length"); 74 74 75 NS_DURING75 @try { 76 76 if ([[NSCharacterSet characterSetWithCharactersInString: @";,."] characterIsMember: 77 77 [string characterAtIndex: selEnd - 1]]) { … … 106 106 range->length = selEnd - selStart; 107 107 range->location += selStart; 108 NS_HANDLER108 } @finally { 109 109 free(urlData); 110 [localException raise]; 111 NS_ENDHANDLER 112 113 free(urlData); 110 } 114 111 } 115 112 -
trunk/ICeCoffEE/ICeCoffEE/ICeCoffEETTView.m
r388 r436 40 40 void ICCF_LaunchURLFromTTView(ICeCoffEETTView *self, NSEvent *triggeringEvent, NSRange range) { 41 41 42 NS_DURING 43 42 @try { 44 43 NSString *s = [self string]; 45 44 unsigned length = [s length]; … … 73 72 ICCF_discardNextMouseUp = YES; 74 73 } 75 76 NS_HANDLER 77 ICCF_HandleException(localException, triggeringEvent); 78 NS_ENDHANDLER 74 } @catch (NSException *e) { 75 ICCF_HandleException(e, triggeringEvent); 76 } 79 77 80 78 ICCF_StopIC(); -
trunk/ICeCoffEE/ICeCoffEE/ICeCoffEETerminal.m
r388 r436 293 293 NSRange range, delimiterRange; 294 294 295 NS_DURING 296 295 @try { 297 296 TermStorage *storage = [(TermController *)[self valueForKey: @"controller"] storage]; 298 297 … … 404 403 } 405 404 } 406 NS_HANDLER407 ICCF_HandleException( localException, ICCF_downEvent);408 NS_ENDHANDLER405 } @catch (NSException *e) { 406 ICCF_HandleException(e, ICCF_downEvent); 407 } 409 408 410 409 ICCF_StopIC(); -
trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEWebKit.m
r388 r436 71 71 return; 72 72 73 NS_DURING73 @try { 74 74 NSPoint viewClickPt = [self convertPoint: downPt fromView: nil]; 75 75 NSDictionary *elementDict = [(WebHTMLView *)self elementAtPoint: viewClickPt]; … … 79 79 if ([elementDict objectForKey: @"WebElementLinkURL"] != nil) { 80 80 ICLog(@"got a link"); 81 NS_VOIDRETURN; // don't activate on links81 return; // don't activate on links 82 82 } 83 83 if (selectedString == nil || [selectedString length] == 0) { 84 84 ICLog(@"no selected string"); 85 NS_VOIDRETURN;85 return; 86 86 } 87 87 ICCF_StartIC(); … … 110 110 } 111 111 } 112 NS_HANDLER 113 ICCF_HandleException(localException, downEvent); 114 NS_ENDHANDLER 112 } @catch (NSException *e) { 113 ICCF_HandleException(e, downEvent); 114 } @finally { 115 [downEvent release]; downEvent = nil; 116 } 115 117 116 [downEvent release]; downEvent = nil;117 118 ICCF_StopIC(); 118 119 }
Note:
See TracChangeset
for help on using the changeset viewer.