Skip to content

Commit

Permalink
Include original error backtrace in when re-raising SocketError
Browse files Browse the repository at this point in the history
- This should make it easier to debug what caused the original
  SocketError

[#116382509](https://www.pivotaltracker.com/story/show/116382509)
  • Loading branch information
ljfranklin committed May 3, 2016
1 parent 6d100cd commit 89757d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bosh_aws_cpi/lib/cloud/aws/cloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def aws_accessible?
@ec2_client.regions.first
true
rescue SocketError => socket_error
cloud_error("Unable to create a connection to AWS; please check your region or EC2 endpoint.\nIaaS Error: #{socket_error.inspect}")
cloud_error("Unable to create a connection to AWS; please check your region or EC2 endpoint.\nIaaS Error: #{socket_error.inspect}\nBacktrace: #{socket_error.backtrace.join("\n")}")
rescue Net::OpenTimeout => e
false
end
Expand Down

0 comments on commit 89757d3

Please sign in to comment.