catch YencError

This commit is contained in:
Ward Wouts 2005-05-11 11:11:04 +00:00
parent 6c92fcd40b
commit d2b51cd188

View file

@ -1,6 +1,6 @@
#!/usr/local/bin/ruby -w #!/usr/local/bin/ruby -w
# $Dwarf: ripnews.rb,v 1.103 2005/03/01 19:56:56 ward Exp $ # $Dwarf: ripnews.rb,v 1.104 2005/05/10 20:52:03 ward Exp $
# $Source$ # $Source$
# #
@ -667,7 +667,7 @@ def main
elsif @articles.group_is_multipart(i) elsif @articles.group_is_multipart(i)
get_multi(i, group) get_multi(i, group)
end end
rescue TempError, PermError rescue TempError, PermError, YencError
print "#{$!}\n" print "#{$!}\n"
print " Skipping article...\n" print " Skipping article...\n"
#print "Caught #{$!.class}\n" #print "Caught #{$!.class}\n"
@ -679,7 +679,7 @@ def main
# if Mark Remaining Read is set do so # if Mark Remaining Read is set do so
elsif @config[group].has_key?("-MRR") and @config[group]["-MRR"] and elsif @config[group].has_key?("-MRR") and @config[group]["-MRR"] and
!(@config[group].has_key?("-X") and i =~ /#{@config[group]["-X"]}/) !(@config[group].has_key?("-X") and i =~ /#{@config[group]["-X"]}/)
print "Marking remaining '#{i}' as read\n" #print "Marking remaining '#{i}' as read\n"
@articles.group_update_newsrc(i) @articles.group_update_newsrc(i)
end end
end end
@ -689,7 +689,7 @@ def main
@articles.disconnect @articles.disconnect
puts "Waiting for decode threads..." puts "Waiting for decode threads..."
ThreadsWait.all_waits(@decode_threads){ |t| ThreadsWait.all_waits(@decode_threads){ |t|
p "Thread #{t} has terminated" puts "Thread #{t} has terminated"
} }
puts "Decode threads all done" puts "Decode threads all done"
end end