# File lib/chef/formatters/error_inspectors/resource_failure_inspector.rb, line 35
        def add_explanation(error_description)
          error_description.section(exception.class.name, exception.message)

          unless filtered_bt.empty?
            error_description.section("Cookbook Trace:", filtered_bt.join("\n"))
          end

          unless dynamic_resource?
            error_description.section("Resource Declaration:", recipe_snippet)
          end

          error_description.section("Compiled Resource:", "#{resource.to_text}")

          # Template errors get wrapped in an exception class that can show the relevant template code,
          # so add them to the error output.
          if exception.respond_to?(:source_listing)
            error_description.section("Template Context:", "#{exception.source_location}\n#{exception.source_listing}")
          end
        end