Yeah, looks like we missed it for 6.0. That said we should be able to log the exception before raising, which was the behavior for load errors and missing commands before PUP-7630 was implemented:
rescue => detail |
#TRANSLATORS `prefetch` is a function name and should not be translated |
Puppet.log_exception(detail, _("Could not prefetch %{type_name} provider '%{name}': %{detail}") % { type_name: type_name, name: provider_class.name, detail: detail }) |
message = _("Could not prefetch %{type_name} provider '%{name}': %{detail}") % { type_name: type_name, name: provider_class.name, detail: detail } |
Puppet.log_exception(detail, message) |
|
if !detail.is_a?(LoadError) && !detail.is_a?(Puppet::MissingCommand) |
raise unless Puppet.settings[:future_features] |
@prefetch_failed_providers[type_name][provider_class.name] = true |
end |
end
|
Secondary issue is that we're currently doing rescue => Exception which isn't desirable, because it will catch all exceptions like SystemExit, which we shouldn't. We should do rescue LoadError, StandardError instead. |