Skip to content

Exceptions are not catched #14

Open
@paxbun

Description

@paxbun

Version: 0.1.2
Rust version: 1.81.0 (LLVM 18)
Git hash: c86ad3a

objc_exception::r#try(|| {
    let _: () = msg_send![
        input_node,
        installTapOnBus: 0usize
        bufferSize: (input_num_samples_per_second / 10.0) as u32
        format: input_format
        block: &*block
    ];
})
.map_err(|error| Error::Other(Box::new(NSError(StrongPtr::new(error as *mut Object)))))

Stacktrace (Firebase Crashlytics):
Image

We're using this library to catch Objective-C exceptions on iOS, but for some reason, RustObjCExceptionTryCatch can't catch the exception thrown from the Rust lambda. AFAIK, Rust's panic unwinding and Objective-C's exception are both based on the Itanium C++ ABI, but I don't know the details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions