EventDispatch::Base
Base class that all formatters should inherit from.
Delegates to file_load_failed
# File lib/chef/formatters/base.rb, line 212 def attribute_file_load_failed(path, exception) file_load_failed(path, exception) end
Delegates to file_loaded
# File lib/chef/formatters/base.rb, line 207 def attribute_file_loaded(path) file_loaded(path) end
# File lib/chef/formatters/base.rb, line 149 def cookbook_resolution_failed(expanded_run_list, exception) description = ErrorMapper.cookbook_resolution_failed(expanded_run_list, exception) display_error(description) end
# File lib/chef/formatters/base.rb, line 154 def cookbook_sync_failed(cookbooks, exception) description = ErrorMapper.cookbook_sync_failed(cookbooks, exception) display_error(description) end
Delegates to file_load_failed
# File lib/chef/formatters/base.rb, line 222 def definition_file_load_failed(path, exception) file_load_failed(path, exception) end
Delegates to file_loaded
# File lib/chef/formatters/base.rb, line 217 def definition_file_loaded(path) file_loaded(path) end
Input: a Formatters::ErrorDescription object. Outputs error to SDOUT.
# File lib/chef/formatters/base.rb, line 128 def display_error(description) puts("") description.display(output) end
Generic callback for any attribute/library/lwrp/recipe file throwing an exception when loaded. Default behavior is to use CompileErrorInspector to print contextual info about the failure.
# File lib/chef/formatters/base.rb, line 176 def file_load_failed(path, exception) description = ErrorMapper.file_load_failed(path, exception) display_error(description) end
Generic callback for any attribute/library/lwrp/recipe file in a cookbook getting loaded. The per-filetype callbacks for file load are overriden so that they call this instead. This means that a subclass of Formatters::Base can implement file_loaded to do the same thing for every kind of file that Chef loads from a recipe instead of implementing all the per-filetype callbacks.
# File lib/chef/formatters/base.rb, line 170 def file_loaded(path) end
Delegates to file_load_failed
# File lib/chef/formatters/base.rb, line 192 def library_file_load_failed(path, exception) file_load_failed(path, exception) end
Delegates to file_loaded
# File lib/chef/formatters/base.rb, line 187 def library_file_loaded(path) file_loaded(path) end
Delegates to file_load_failed
# File lib/chef/formatters/base.rb, line 202 def lwrp_file_load_failed(path, exception) file_load_failed(path, exception) end
Delegates to file_loaded
# File lib/chef/formatters/base.rb, line 197 def lwrp_file_loaded(path) file_loaded(path) end
# File lib/chef/formatters/base.rb, line 139 def node_load_failed(node_name, exception, config) description = ErrorMapper.node_load_failed(node_name, exception, config) display_error(description) end
# File lib/chef/formatters/base.rb, line 122 def print(*args) @output.print(*args) end
# File lib/chef/formatters/base.rb, line 118 def puts(*args) @output.puts(*args) end
Delegates to file_load_failed
# File lib/chef/formatters/base.rb, line 232 def recipe_file_load_failed(path, exception) file_load_failed(path, exception) end
Delegates to file_loaded
# File lib/chef/formatters/base.rb, line 227 def recipe_file_loaded(path) file_loaded(path) end
# File lib/chef/formatters/base.rb, line 181 def recipe_not_found(exception) description = ErrorMapper.file_load_failed(nil, exception) display_error(description) end
# File lib/chef/formatters/base.rb, line 133 def registration_failed(node_name, exception, config) #A Formatters::ErrorDescription object description = ErrorMapper.registration_failed(node_name, exception, config) display_error(description) end
Generated with the Darkfish Rdoc Generator 2.