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

Improve Metadata update error handling #506

Conversation

romain-grecourt
Copy link
Contributor

Improve Metadata update error handling:

  • Make Plugins.PluginFailed a checked exception to force error handling
  • Wrap Plugins.PluginFailed with Metadata.UpdatedFailed as another checked exception to expose metadata update errors
  • Metadata.UpdateFailed is explicitly thrown by every public methods of Metadata that performs an update check

Promote io.helidon.build.cli.codegen.Unchecked to io.helidon.build.util.Unchecke
Rename util module from helidon.build.utils to io.helidon.build.util (same as the package name)

Fixes #487

 - Make Plugins.PluginFailed a checked exception to force error handling
 - Wrap Plugins.PluginFailed with Metadata.UpdatedFailed as another checked exception to expose metadata update errors
 - Metadata.UpdateFailed is explicitly thrown by every public methods of Metadata that performs an update check

Promote io.helidon.build.cli.codegen.Unchecked to io.helidon.build.util.Unchecke
Rename util module from helidon.build.utils to io.helidon.build.util (same as the package name)

Fixes helidon-io#487
@romain-grecourt romain-grecourt added this to the 2.2.4 milestone Sep 29, 2021
@romain-grecourt romain-grecourt self-assigned this Sep 29, 2021
@romain-grecourt romain-grecourt merged commit 3189a65 into helidon-io:helidon-2.x Sep 29, 2021
@romain-grecourt romain-grecourt deleted the improve-metadata-update-error-handling branch September 29, 2021 23:40
@romain-grecourt romain-grecourt mentioned this pull request Jan 4, 2022
romain-grecourt added a commit to romain-grecourt/helidon-build-tools that referenced this pull request Jan 4, 2022
Make Plugins.PluginFailed a checked exception to force error handling
Wrap Plugins.PluginFailed with Metadata.UpdatedFailed as another checked exception to expose metadata update errors
Metadata.UpdateFailed is explicitly thrown by every public methods of Metadata that performs an update check
Promote io.helidon.build.cli.codegen.Unchecked to io.helidon.build.util.Unchecke

Fixed a bug in Plugin log when Plugin.execute is invoked with a null consumer for output.

Fixes helidon-io#487
Fixes helidon-io#507 (forward port of helidon-io#506)
romain-grecourt added a commit that referenced this pull request Jan 5, 2022
* Improve Metadata update error handling:

Make Plugins.PluginFailed a checked exception to force error handling
Wrap Plugins.PluginFailed with Metadata.UpdatedFailed as another checked exception to expose metadata update errors
Metadata.UpdateFailed is explicitly thrown by every public methods of Metadata that performs an update check
Promote io.helidon.build.cli.codegen.Unchecked to io.helidon.build.util.Unchecke

Fixed a bug in Plugin log when Plugin.execute is invoked with a null consumer for output.

Fixes #487
Fixes #507 (forward port of #506)

* Always pass-in a string consumer for Plugins.execute
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.

2 participants