From be3b98a52ae6773913696955e2d9c6585fc89441 Mon Sep 17 00:00:00 2001 From: Tim Pierce Date: Thu, 25 Sep 2014 14:09:02 -0400 Subject: [PATCH] 3901: improve component rendering error reports The "Components" tab on the /pipeline_instances page now includes the error that was encountered, and a collapsed panel with the full backtrace. --- .../app/helpers/pipeline_components_helper.rb | 3 ++- .../_show_components_json.html.erb | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/workbench/app/helpers/pipeline_components_helper.rb b/apps/workbench/app/helpers/pipeline_components_helper.rb index 28adfa9f99..9fead2c8f0 100644 --- a/apps/workbench/app/helpers/pipeline_components_helper.rb +++ b/apps/workbench/app/helpers/pipeline_components_helper.rb @@ -8,7 +8,8 @@ module PipelineComponentsHelper logger.error "#{e.backtrace.join("\n\t")}" case fallback when :json - render(partial: "pipeline_instances/show_components_json") + render(partial: "pipeline_instances/show_components_json", + locals: {error_name: e.inspect, backtrace: e.backtrace.join("\n\t")}) end end end diff --git a/apps/workbench/app/views/pipeline_instances/_show_components_json.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components_json.html.erb index 3cdd5aedb3..9d1edbf264 100644 --- a/apps/workbench/app/views/pipeline_instances/_show_components_json.html.erb +++ b/apps/workbench/app/views/pipeline_instances/_show_components_json.html.erb @@ -1,5 +1,7 @@

The components of this pipeline are in a format that Workbench does not recognize.

+

Error encountered: <%= error_name %>

+

@@ -13,4 +15,16 @@
<%= Oj.dump(@object.components, indent: 2) %>

+
+

+ + Show backtrace + +

+
+
+
+
<%= backtrace %>
+
+
-- 2.30.2