[Adium-devl] AI_DURING
David Smith
catfish.man at gmail.com
Mon Feb 12 18:29:17 UTC 2007
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
More information about the devel
mailing list