mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ec2] pass through backtrace when reraising ec2 errors
This commit is contained in:
parent
79767e6144
commit
eff7978b64
1 changed files with 3 additions and 1 deletions
|
@ -226,7 +226,9 @@ module Fog
|
|||
})
|
||||
rescue Excon::Errors::Error => error
|
||||
if match = error.message.match(/<Code>(.*)<\/Code><Message>(.*)<\/Message>/)
|
||||
raise Fog::AWS::EC2::Error.new("#{match[1]} => #{match[2]}")
|
||||
new_error = Fog::AWS::EC2::Error.new("#{match[1]} => #{match[2]}")
|
||||
new_error.set_backtrace(error.backtrace)
|
||||
raise new_error
|
||||
else
|
||||
raise error
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue