B #3439: polish onevcenter tool, second (#3498)

* B #3439: polish onevcenter tool, second

Signed-off-by: Carlos J. Herrera Matos <cherrera@opennebula.systems>

* B #3439: show backtrace when debug_information is true

Signed-off-by: Carlos J. Herrera Matos <cherrera@opennebula.systems>
(cherry picked from commit 3a60e67657)
This commit is contained in:
Carlos J. Herrera authored and Tino Vazquez committed 2019-07-12 14:38:35 +02:00
1 parent 2541dba788
commit fd292b28f0
1 file changed
+3 -1
@@ -512,7 +512,9 @@ module VCenterDriver
puts "\n"
exit 0 #Ctrl+C
rescue Exception => e
STDOUT.puts " Error: #{e.message}/\n#{e.backtrace}"
error_msg = "\nError: #{e.message}\n"
error_msg << "#{e.backtrace}\n" if VCenterDriver::CONFIG[:debug_information]
STDOUT.puts error_msg
ensure
vi_client.close_connection if vi_client
end