Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.

Commit a6fe2ac

Browse files
author
jfisher
committed
Fixes from comments associated with r12.
1 parent b7dd025 commit a6fe2ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/gdata/http/response.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ class Response
2525
# The headers of the HTTP response.
2626
attr_accessor :headers
2727

28+
# Converts the response body into a REXML::Document
2829
def to_xml
2930
if @body
3031
begin
3132
return REXML::Document.new(@body).root
3233
rescue
33-
return nil
34+
raise RuntimeError, "Response body not XML."
3435
end
3536
else
3637
return nil

0 commit comments

Comments
 (0)