root/lang/objective-cplusplus/i3/trunk/src/mil/include/mil/ObjCExceptionFix.h @ 36985

Revision 36985, 1.0 kB (checked in by saturday06, 3 years ago)

cdfix

Line 
1#pragma once
2
3//#ifdef MIL_OBJC_EXCEPTION_IS_BROKEN
4
5#import <Foundation/NSException.h>
6
7#if defined(__cplusplus) && defined(GNUSTEP) && defined(_NATIVE_OBJC_EXCEPTIONS)
8#import <GNUstepBase/preface.h>
9#if  GNUSTEP_BASE_MAJOR_VERSION  < 3 || \
10     GNUSTEP_BASE_MAJOR_VERSION == 3 && \
11       (GNUSTEP_BASE_MINOR_VERSION  < 20 || \
12        GNUSTEP_BASE_MINOR_VERSION == 20 && \
13           GNUSTEP_BASE_SUBMINOR_VERSION < 100)
14
15#undef NS_DURING
16#undef NS_HANDLER
17#undef NS_ENDHANDLER
18
19#define NS_DURING      @try {
20#define NS_HANDLER     } @catch (id) {                                      \
21                           NSException* localException =                    \
22                                 [NSException exceptionWithName:@"Unknown"  \
23                                              reason:@"Unknown"             \
24                                              userInfo:nil];                \
25                           {
26#define NS_ENDHANDLER      }                    \
27                       }
28
29#endif
30#endif
31
Note: See TracBrowser for help on using the browser.