From a8d0861e6a98eed66978c90675cd5a1187682ab3 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 25 Jul 2022 08:34:13 -0500 Subject: [PATCH] Error String becomes an exception So that singletons can be added, for example --- lib/command.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/command.rb b/lib/command.rb index 1f5bb36..0645c65 100644 --- a/lib/command.rb +++ b/lib/command.rb @@ -104,6 +104,7 @@ class Command }.catch_only(Timeout) { nil }.catch_only(FinalStanza) { |e| @blather << e.stanza }.catch do |e| + e = RuntimeError.new(e) if e.is_a?(String) send_final_error(e) EMPromise.reject(e) end -- 2.38.5