# File lib/capybara-screenshot/saver.rb, line 28 def save current_path do |path| if !path.empty? begin save_html if @html_save rescue StandardError => e warn "WARN: HTML source could not be saved. An exception is raised: #{e.inspect}." end begin save_screenshot rescue StandardError => e warn "WARN: Screenshot could not be saved. An exception is raised: #{e.inspect}." end else warn 'WARN: Screenshot could not be saved. `page.current_path` is empty.' end end end