lib/google_service.rb in gdata-jruby-client-0.7.2 vs lib/google_service.rb in gdata-jruby-client-0.7.3
- old
+ new
@@ -23,12 +23,11 @@
else
get_feed(options[:url] || options[:query],
options[:class].java_class)
end
rescue NativeException => e
- return nil if e.message =~ /NotFound/
- raise e
+ raise GData.gdata_exception_for(e)
end
end
def find_entry(options={})
raise "URL or query is required" unless options[:url] or option[:query]
@@ -43,21 +42,21 @@
else
get_entry(options[:url] || options[:query],
options[:class].java_class)
end
rescue NativeException => e
- return nil if e.message =~ /NotFound/
- raise e
+ raise GData.gdata_exception_for(e)
end
end
def create_entry(options={})
raise "Feed URL is required" unless options[:url]
raise "Entry is required" unless options[:entry]
options[:url] = url_for(options[:url]) if options[:url]
-
insert(options[:url], options[:entry])
+ rescue NativeException => e
+ raise GData.gdata_exception_for(e)
end
def delete_entry(options={})
raise "Entry URL is required" unless options[:url]
options[:url] = url_for(options[:url]) if options[:url]
@@ -69,8 +68,10 @@
raise "Feed URL is required" unless options[:url]
raise "Feed is required" unless options[:feed]
options[:url] = url_for(options[:url]) if options[:url]
batch(options[:url], options[:feed])
+ rescue NativeException => e
+ raise GData.gdata_exception_for(e)
end
end