【发布时间】:2016-07-14 09:53:56
【问题描述】:
为什么我的rescue 没有从异常中解救出来?
错误
2016-07-14T09:43:06.062Z 6490 TID-ox0hrishg WARN: URI::InvalidURIError: bad URI(is not URI?):
2016-07-14T09:43:06.062Z 6490 TID-ox0hrishg WARN: /Users/stas/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/uri/rfc3986_parser.rb:18:in `rescue in split'
begin
xml_loop(@xml.products)
rescue URI::InvalidURIError
index = @xml.get_index(XmlTracker.last.xml_id)
xml_loop(@xml.products[index...900])
else
....
end
如何处理?
【问题讨论】:
标签: ruby-on-rails ruby exception-handling