Expand description

Objective-C’s @throw and @try/@catch.

By default, if the msg_send! macro causes an exception to be thrown, this will unwind into Rust, resulting in undefined behavior. However, this crate has an "catch-all" feature which, when enabled, wraps each msg_send! in a @catch and panics if an exception is caught, preventing Objective-C from unwinding into Rust.

The @try/@catch functionality in this module is only available when the "exception" feature is enabled.

See the following links for more information:

Structs

An Objective-C exception.

Functions

catchexception

Tries to execute the given closure and catches an Objective-C exception if one is thrown.

throwexception

Throws an Objective-C exception.