History log of /expo/packages/expo-modules-core/build/sweet/NativeErrorManager.d.ts (Results 1 – 1 of 1)
Revision Date Author Comments
# 6d19a6af 26-Jan-2022 Łukasz Kosmaty <[email protected]>

[sweet][kotlin] Add basic 'LogBox' integration (#15834)

# Why

When something goes wrong when invoking prop setters, we can't inform the user about it. Previously, we just ignored such a case and

[sweet][kotlin] Add basic 'LogBox' integration (#15834)

# Why

When something goes wrong when invoking prop setters, we can't inform the user about it. Previously, we just ignored such a case and logged the exception to the native console. However, it isn't ideal in a long run. So, I've added a simple `LogBox` integration to display exceptions there.

# How

Unfortunately, `LogBox` doesn't have a native API. To display something in it, I have to send an exception to js (as an event) and log it there.
I've created a new module that is registered in the kotlin bridge. This module isn't necessary on Android, but it's helpful. Moreover, we will need it on iOS.

> Note:
I've changed how we obtain `NativeUnimoduleProxy` from the react context. The old way wasn't working in every case.

# Test Plan

- bare-expo ✅
(This error was thrown in prop setter)
![image](https://user-images.githubusercontent.com/9578601/148577303-cfd86502-784d-4658-808f-02c79f0d0296.png)

show more ...