forked from gnustep/libobjc2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add objc_setUncaughtExceptionHandler() API
- Loading branch information
Showing
6 changed files
with
61 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__) | ||
#pragma clang system_header | ||
#endif | ||
#include "objc-visibility.h" | ||
|
||
#ifndef __OBJC_EXCEPTION_INCLUDED__ | ||
#define __OBJC_EXCEPTION_INCLUDED__ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
typedef void (*objc_uncaught_exception_handler)(id exception); | ||
|
||
/** | ||
* Throw a runtime exception. Inserted by the compiler in place of @throw. | ||
*/ | ||
OBJC_PUBLIC | ||
void objc_exception_throw(id object); | ||
|
||
/** | ||
* Installs handler for uncaught Objective-C exceptions. If the unwind library | ||
* reaches the end of the stack without finding a handler then the handler is | ||
* called. Returns the previous handler. | ||
*/ | ||
OBJC_PUBLIC | ||
objc_uncaught_exception_handler objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler handler); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // __OBJC_EXCEPTION_INCLUDED__ |