summaryrefslogtreecommitdiff
path: root/report/report_content.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-05-12 13:09:17 +0200
committermguetlein <martin.guetlein@gmail.com>2011-05-12 13:09:17 +0200
commitac97115f25ca0e8ecc3ffb6baed3739353cadb6f (patch)
treeb7dbb98a791db2685943e5d3d9999192ca131989 /report/report_content.rb
parentc858faa20607125097a3ca36f9178c4b4076b071 (diff)
rescue non-runtime error when plotting, more sensible error msg when no predictions for regression plot
Diffstat (limited to 'report/report_content.rb')
-rwxr-xr-xreport/report_content.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/report/report_content.rb b/report/report_content.rb
index 1e47cee..6c8148e 100755
--- a/report/report_content.rb
+++ b/report/report_content.rb
@@ -161,7 +161,7 @@ class Reports::ReportContent
plot_file_path = add_tmp_file(plot_file_name)
Reports::PlotFactory.create_regression_plot( plot_file_path, prediction_set, name_attribute )
@xml_report.add_imagefigure(section_regr, image_title, plot_file_name, "PNG", 100, image_caption)
- rescue RuntimeError => ex
+ rescue Exception => ex
LOGGER.error("Could not create regression plot: "+ex.message)
rm_tmp_file(plot_file_name)
@xml_report.add_paragraph(section_regr, "could not create regression plot: "+ex.message)
@@ -200,7 +200,7 @@ class Reports::ReportContent
plot_file_path = add_tmp_file(plot_file_name)
Reports::PlotFactory.create_roc_plot( plot_file_path, prediction_set, class_value, split_set_attribute, false )#prediction_set.size>1 )
@xml_report.add_imagefigure(section_roc, image_title, plot_file_name, "PNG", 100, image_caption)
- rescue RuntimeError => ex
+ rescue Exception => ex
msg = "WARNING could not create roc plot for class value '"+class_value.to_s+"': "+ex.message
LOGGER.error(msg)
rm_tmp_file(plot_file_name)