[pigeon] Make Kotlin FlutterError a runtime error#11469
Conversation
Change the Kotlin generator's `FlutterError` to inherit from `RuntimException`, rather than just `Runnable`, so that it behaves as an unchecked error when used from Java (as is the case for the Java version). Fixes flutter/flutter#184200
There was a problem hiding this comment.
Code Review
This pull request updates the Pigeon generator to make generated error classes inherit from RuntimeException instead of Throwable, improving Java interoperability. The change includes updates to the Kotlin generator, platform test files, and the package version. A test case was added to verify the inheritance, and a suggestion was provided to make the test assertion more robust by specifically targeting the FlutterError class definition.
tarrinneal
left a comment
There was a problem hiding this comment.
This isn't breaking at all?
|
flutter/packages@0e0a032...1aa892c 2026-04-09 [email protected] [webview_flutter_android] Adds support to opt out of Android inset changes (flutter/packages#11192) 2026-04-08 [email protected] Roll Flutter from a0924c7 to 05e0ae0 (24 revisions) (flutter/packages#11470) 2026-04-08 [email protected] [pigeon] Make Kotlin FlutterError a runtime error (flutter/packages#11469) 2026-04-08 [email protected] [path_provider] Remove dependency on engine PathUtils (flutter/packages#11467) 2026-04-07 [email protected] [all] Prepare packages for skills (flutter/packages#11430) 2026-04-07 [email protected] Roll Flutter from 9cd60b5 to a0924c7 (13 revisions) (flutter/packages#11463) 2026-04-07 [email protected] [google_maps_flutter] Android cluster pin info window onTap callback not firing (flutter/packages#11390) 2026-04-07 [email protected] [flutter_svg] Remove generated CMake files (flutter/packages#11459) 2026-04-07 [email protected] [various] Convert remaining Groovy files to Kotlin (flutter/packages#11443) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#184829) flutter/packages@0e0a032...1aa892c 2026-04-09 [email protected] [webview_flutter_android] Adds support to opt out of Android inset changes (flutter/packages#11192) 2026-04-08 [email protected] Roll Flutter from a0924c7 to 05e0ae0 (24 revisions) (flutter/packages#11470) 2026-04-08 [email protected] [pigeon] Make Kotlin FlutterError a runtime error (flutter/packages#11469) 2026-04-08 [email protected] [path_provider] Remove dependency on engine PathUtils (flutter/packages#11467) 2026-04-07 [email protected] [all] Prepare packages for skills (flutter/packages#11430) 2026-04-07 [email protected] Roll Flutter from 9cd60b5 to a0924c7 (13 revisions) (flutter/packages#11463) 2026-04-07 [email protected] [google_maps_flutter] Android cluster pin info window onTap callback not firing (flutter/packages#11390) 2026-04-07 [email protected] [flutter_svg] Remove generated CMake files (flutter/packages#11459) 2026-04-07 [email protected] [various] Convert remaining Groovy files to Kotlin (flutter/packages#11443) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Change the Kotlin generator's
FlutterErrorto inherit fromRuntimeException, rather than justRunnable, so that it behaves as an unchecked error when used from Java (as is the case for the Java version).Fixes flutter/flutter#184200
Pre-Review Checklist
[shared_preferences]///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2