dont fail with stacktrace on connection errors

This commit is contained in:
Dominik Richter 2016-03-24 23:14:12 +01:00
parent ed9ad28afb
commit 856460054f

View file

@ -37,6 +37,11 @@ module Inspec
end
cls.new
rescue Train::ClientError => e
raise "Client error, can't connect to '#{name}' backend: #{e.message}"
rescue Train::TransportError => e
raise "Transport error, can't connect to '#{name}' backend: #{e.message}"
end
end
end