From 182a7cdc6ceb307e11cd012ae8930a1b257e3113 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Fri, 22 Jan 2021 08:49:56 +1100 Subject: [PATCH] feat: catch and log error during help text generation --- lib/pact/provider/help/write.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pact/provider/help/write.rb b/lib/pact/provider/help/write.rb index e32575ab..0931c4dd 100644 --- a/lib/pact/provider/help/write.rb +++ b/lib/pact/provider/help/write.rb @@ -21,6 +21,8 @@ def initialize pact_sources, reports_dir def call clean_reports_dir write + rescue StandardError => e + Pact.configuration.error_stream.puts("ERROR: Error generating help output - #{e.class} #{e.message} \n" + e.backtrace.join("\n")) end private