[Adium-devl] AI_DURING
Evan Schoenberg
evan at adiumx.com
Mon Feb 12 19:54:04 UTC 2007
I don't think we need it anymore; @try can be used instead.
We were previously catching *all* exceptions in the exception
controller; this was needed to temporarily disable exception
catching. Peter fixed that in [17656] at Ken Ferry's suggestion; we
now only catch exceptions which wouldn't otherwise be handled.
Also, @try is a 10.3+ ism, I think, so we couldn't use it while were
10.2 compatible... or perhaps I made that part up :)
-Evan
On Feb 12, 2007, at 1:29 PM, David Smith wrote:
> Do we need this? We use it in 10 places, but we use @try in some
> other places.
>
> #define AI_DURING id NSExceptionHandlerClass = NSClassFromString
> (@"NSExceptionHandler"); \
> id _theExceptionHandler = nil, _theExceptionHandlerDelegate =
> nil; \
> if (NSExceptionHandlerClass) { \
> typedef id (*DefaultExceptionHandler)(id, SEL, id); \
> DefaultExceptionHandler handlerImp; \
> handlerImp = (DefaultExceptionHandler)[NSExceptionHandlerClass
> methodForSelector:@selector(defaultExceptionHandler)]; \
> _theExceptionHandler = handlerImp(NSExceptionHandlerClass,
> @selector(defaultExceptionHandler), nil); \
> } \
> if (_theExceptionHandler) _theExceptionHandlerDelegate =
> [_theExceptionHandler delegate]; \
> [_theExceptionHandler setDelegate:nil]; \
> NS_DURING
> #define AI_HANDLER NS_HANDLER
> #define AI_ENDHANDLER NS_ENDHANDLER \
> [_theExceptionHandler setDelegate:_theExceptionHandlerDelegate];
>
>
>
> David
>
> _______________________________________________
> Adium-devl mailing list
> Adium-devl at adiumx.com
> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070212/2bfbea4c/attachment.sig>
More information about the devel
mailing list