mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Apply patch from bug #16437
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22827 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
501a72f55f
commit
98f6da8323
3 changed files with 22 additions and 1 deletions
|
@ -254,11 +254,22 @@ GS_EXPORT NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler;
|
|||
resources allocated in the routine, possibly case on the error code
|
||||
and perform special processing, and default to RERAISE the error to
|
||||
the next handler. Within the scope of the handler, a local variable
|
||||
called exception holds information about the exception raised.
|
||||
called "localException" holds information about the exception raised.
|
||||
|
||||
It is illegal to exit the first block of code by any other means than
|
||||
NS_VALRETURN, NS_VOIDRETURN, or just falling out the bottom.
|
||||
*/
|
||||
#ifdef _NATIVE_OBJC_EXCEPTIONS
|
||||
|
||||
# define NS_DURING @try {
|
||||
# define NS_HANDLER } @catch (NSException * localException) {
|
||||
# define NS_ENDHANDLER }
|
||||
|
||||
# define NS_VALRETURN(val) return (val)
|
||||
# define NS_VALUERETURN(object, id) return (object)
|
||||
# define NS_VOIDRETURN return
|
||||
|
||||
#else // _NATIVE_OBJC_EXCEPTIONS
|
||||
|
||||
/** Private support routine. Do not call directly. */
|
||||
GS_EXPORT void _NSAddHandler( NSHandler *handler );
|
||||
|
@ -287,6 +298,8 @@ GS_EXPORT void _NSRemoveHandler( NSHandler *handler );
|
|||
#define NS_VOIDRETURN do { _NSRemoveHandler(&NSLocalHandler); \
|
||||
return; } while (0)
|
||||
|
||||
#endif // _NATIVE_OBJC_EXCEPTIONS
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Assertion Handling */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue