class FilterTable::ExceptionCatcher

def initialize(original_resource, original_exception)

def initialize(original_resource, original_exception)
  @original_resource = original_resource
  @original_exception = original_exception
end

def method_missing(*)

Capture message chains and return `ExceptionCatcher` objects
def method_missing(*)
  self
end

def resource_exception_message

def resource_exception_message
  @original_exception.message
end

def resource_failed?

being added to the test collection and being evaluated.
showing why the resource failed. This prevents the resource from
This method is called via the runner and signals RSpec to output a block
def resource_failed?
  @original_exception.is_a?(Inspec::Exceptions::ResourceFailed)
end

def resource_skipped?

being added to the test collection and being evaluated.
showing why the resource was skipped. This prevents the resource from
This method is called via the runner and signals RSpec to output a block
def resource_skipped?
  @original_exception.is_a?(Inspec::Exceptions::ResourceSkipped)
end

def respond_to?(_method)

allows it to skip past that check and fall through to #method_missing
before calling it. We need to fake it out and tell it that it does. This
RSpec will check the object returned to see if it responds to a method
def respond_to?(_method)
  true
end

def to_s

def to_s
  @original_resource.to_s
end