Skip to content

Commit

Permalink
call on failure when no parser available
Browse files Browse the repository at this point in the history
  • Loading branch information
julien51 committed Mar 18, 2009
1 parent 4da7350 commit fb96813
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/feedzirra/feed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def self.add_url_to_multi(multi, url, url_queue, responses, options)
options[:on_success].call(url, feed) if options.has_key?(:on_success)
else
# puts "Error determining parser for #{url} - #{c.last_effective_url}"
raise NoParserAvailable.new("no valid parser for content.")
# raise NoParserAvailable.new("no valid parser for content.") (this would unfirtunately fail the whole 'multi', so it's not really useable)
options[:on_failure].call(url, c.response_code, c.header_str, c.body_str) if options.has_key?(:on_failure)
end
end
curl.on_failure do |c|
Expand Down
2 changes: 1 addition & 1 deletion lib/feedzirra/feed_entry_utilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def parse_datetime(string)
##
# Returns the id of the entry or its url if not id is present, as some formats don't support it
def id
@id || url
@id || @url
end

##
Expand Down

0 comments on commit fb96813

Please sign in to comment.