lib/grapher.rb in stresser-0.3.1 vs lib/grapher.rb in stresser-0.3.2

- old
+ new

@@ -21,11 +21,15 @@ report_keys = reports(options[:report_definitions]).keys report_keys = [options[:report]] if report_keys.include?(options[:report]) # Generate report(s) report_keys.each do |report| - outfile = File.join(options[:output_dir], "#{prefix}_#{report}.png") - generate_report(report, options[:csv_file], outfile) + begin + outfile = File.join(options[:output_dir], "#{prefix}_#{report}.png") + generate_report(report, options[:csv_file], outfile) + rescue => e + puts "Error generating #{report}: #{e.inspect}" + end end # Tell user what to do next puts "~"*80 puts "Great, now open the images with"