Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Explicitly catch ClassNotFound and NoSuchMethod errors #318

Merged
merged 5 commits into from
Nov 11, 2024

Conversation

mrousavy
Copy link
Owner

@mrousavy mrousavy commented Nov 11, 2024

Explicitly catches ClassNotFoundException and NoSuchMethodError errors, which happen when the class or constructor cannot be found by JNI.

These errors can occur when the user puts the class in the wrong namespace, forgets to implement a default-constructor, or when it gets stripped by ProGuard in release builds. In those cases, Nitro will throw with a nicer error message for the user.

Copy link

vercel bot commented Nov 11, 2024

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) Nov 11, 2024 4:26pm

@mrousavy mrousavy changed the title feat: Explicitly catch ClassNotFoundException errors feat: Explicitly catch ClassNotFound and NoSuchMethod errors Nov 11, 2024
…etti (#319)

* feat: Move JNI lookup code to `AutolinkedHybridObject`

* fix: Extract name & format

* fix: Remove null check from generated code

* Fix typename

* whoops

* Update AutolinkedHybridObject.hpp

* Update AutolinkedHybridObject.hpp

* hä geht eh so oida

* `AutolinkedHybridObject` -> `ConstructableHybridObject`
@mrousavy mrousavy merged commit e37d261 into main Nov 11, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant