Skip to content

Commit

Permalink
Capture exception in rescue block of vm_creator#create.
Browse files Browse the repository at this point in the history
Change exception logging to use #inspect

[#103367654](https://www.pivotaltracker.com/story/show/103367654)

Signed-off-by: Aaron Hurley <[email protected]>
  • Loading branch information
Alexey Miroshkin authored and pivotal committed Sep 24, 2015
1 parent 6a76900 commit 8060516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vsphere_cpi/lib/cloud/vsphere/vm_creator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def create(agent_id, stemcell_cid, networks, persistent_disk_cids, environment)
begin
created_vm.delete if created_vm
rescue => ex
@logger.info("Failed to delete vm '#{vm_cid}' with message: #{ex.message}")
@logger.info("Failed to delete vm '#{vm_cid}' with message: #{ex.inspect}")
end
raise e
end
Expand Down

0 comments on commit 8060516

Please sign in to comment.