mrousavy / nitro

🔥 Insanely fast native C++, Swift or Kotlin modules with a statically compiled binding layer to JSI
https://nitro.margelo.com
MIT License
650 stars 22 forks source link

fix: Make `Promise` catch any `Throwable` instead of `Error` subclass #337

Closed mrousavy closed 1 week ago

mrousavy commented 1 week ago

Previously, Promise caught only Error on Kotlin. If you throw something else (e.g. Exception), this would've not been caught. So now instead we catch the highest level throwable, which is Throwable itself.

This catches every exception or runtime error and also carries enough string information with it to be represented as a JS error.

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **nitro-docs** | ⬜️ Skipped ([Inspect](https://vercel.com/margelo/nitro-docs/76gugJcXqEe6YiUKKHtHiXRFrych)) | | | Nov 16, 2024 11:30pm |