[jni] `PortProxyBuilder$DartException` extends checked `Exception`
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- backend, documentation
Research direction
Start with pkgs/jni/java/src/main/java/com/github/dart_lang/jni/PortProxyBuilder.java, where DartException is defined, and verify the reported behavior for a Dart callback invoked through a Java interface method without a throws declaration. Then document that UndeclaredThrowableException can have a null message; done means the behavior and its cause are clearly documented. The possible RuntimeException change is only a consideration for 2.0.
Written by the indexing model from the issue text.
Description
PortProxyBuilder$DartException extends checked Exception.
When a Dart callback throws inside a Java interface method that doesn't declare throws Exception, java.lang.reflect.Proxy wraps DartException in UndeclaredThrowableException, whose getMessage() is null.
We should document this clearly now, and consider changing DartException to extend RuntimeException in 2.0.
Split out from #3836.
Note: This bug is AI generated. I've reviewed it and it makes sense, but I haven't attempted to repro. Make sure the bug repros before trying to fix it.
- Dominant language
- Dart
- Stars
- 280
- Forks
- 166
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 35
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dart-lang/native
-
lang-java needs-triage package:jni package:jni_flutter package:jnigen
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 2 days
-
lang-java needs-triage package:jni package:jni_flutter package:jnigen
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 2 days
-
needs-triage package:ffigen
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
needs-triage package:ffigen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
needs-triage package:hooks_runner
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
All issues in dart-lang/native
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
finamp-app/finamp#1920 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
package:skills
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
act.await-dev-pr co.request d.new-feature dev.flavors e1-hours p2-medium st.blocked t.cli-tools target.web
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
flutter/website#14165 · 1 comment ·
Maintainers usually reply within 1 day