Permalink
Browse files

Fix error handling code

  • Loading branch information...
1 parent bfe3e46 commit 8b694b40acf9f9a4bf66b52ece56a129eb7c667c @aboisvert aboisvert committed with konstantin-dzreev Dec 20, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/s3/right_s3_interface.rb
@@ -1189,13 +1189,13 @@ def reset
@result = []
end
def tagstart(name, attributes)
- @error = {}
+ @error = {} if name == 'Error'
end
def tagend(name)
case name
- when 'Key' then current[:key] = @text
- when 'Code' then current[:code] = @text
- when 'Message' then current[:message] = @text
+ when 'Key' then @error[:key] = @text
+ when 'Code' then @error[:code] = @text
+ when 'Message' then @error[:message] = @text
when 'Error' then @result << @error
end
end

0 comments on commit 8b694b4

Please sign in to comment.