This certainly works, but is slightly less efficient as the caught exception is explicit to the jvm (so a non-processed exception will not be caught and rethrown which would be the corollary of your solution)
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Reviving Checked exceptions | 28 | 2957 | July 22, 2024 | |
| In future, could Kotlin have checked exceptions? | 137 | 40496 | October 28, 2022 | |
| How to catch non kotlin exception? | 14 | 5899 | June 11, 2018 | |
| Kotlin multiplatform project - Checked exception | 1 | 1527 | January 16, 2020 | |
| If ... throws | 6 | 4819 | December 6, 2018 |