rickclephas / NSExceptionKt

A Kotlin Multiplatform Library to improve crash reports on Apple platforms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FIRCLSExceptionRecordNSException v.s. raise it

b95505017 opened this issue · comments

It seems like FIRCLSExceptionRecordNSException is not a public api? Wondering why not just raise the NSException.

Yeah, correct, it isn't part of the public API.
The main reason why we don't raise exceptions is that we don't want to interrupt the existing flow.
If we were to raise an exception, any existing unhandeled exception hooks wouldn't be called anymore.

Does FIRCLSExceptionRecordNSException be called explicitly when an exception triggered/raised in a pure iOS project without KMP? I want to follow the same flow.

Yes Crashlytics uses FIRCLSExceptionRecordNSException internally as well, as can be seen in the source code.