Method: PDK::Generate::ResourceAPIObject#raise_precondition_error
- Defined in:
- lib/pdk/generate/resource_api_object.rb
#raise_precondition_error(error) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Helper method to raise an error if the Resource API is not available
45 46 47 48 49 50 51 |
# File 'lib/pdk/generate/resource_api_object.rb', line 45 def raise_precondition_error(error) raise PDK::CLI::ExitWithError, _('%{error}: Creating a %{thing_name} needs some local configuration in your module.' \ ' Please follow the docs at https://puppet.com/docs/puppet/latest/create_types_and_providers_resource_api.html') % { thing_name: friendly_name, error: error, } end |