module Kitchen::Debug

Debug helpers

Constants

CONTEXT_LINES

Public Class Methods

get_error_location(error, source_location) click to toggle source
# File lib/kitchen/debug/print_recipe_error.rb, line 69
def self.get_error_location(error, source_location)
  error_location = error.backtrace.detect do |entry|
    entry.start_with?(source_location) || entry.match?(/kitchen\/lib\/kitchen\/directions/)
  end

  error_filename, error_line_number = error_location.match(/(.*):(\d+):/)[1..2]
  [error_line_number.to_i, error_filename]
end
print_backtrace_info(error) click to toggle source
print_error_message(error) click to toggle source
print_file_line(line_number, line) click to toggle source
print_file_line_with_context(line_number, filename) click to toggle source
print_line_in_document_where_error_occurred(document) click to toggle source
print_recipe_error(error:, source_location:, document:) click to toggle source
print_specific_help_line(error) click to toggle source
verbose?() click to toggle source
# File lib/kitchen/debug/print_recipe_error.rb, line 23
def self.verbose?
  !ENV['VERBOSE'].nil?
end