catch Net::NNTPReplyError
This commit is contained in:
parent
ad01c5110e
commit
0679c27187
1 changed files with 12 additions and 2 deletions
|
|
@ -68,7 +68,12 @@ def get_group_body(subj)
|
|||
end
|
||||
|
||||
def get_group_body_first(subj)
|
||||
begin
|
||||
resp, id, messid, list = @nntp.body(@groups[subj]["messages"][0])
|
||||
rescue Net::NNTPReplyError
|
||||
print "Caught Net::NNTPReplyError reading article #{@groups[subj]["messages"][0]}\n"
|
||||
return false
|
||||
end
|
||||
print "getting article: #{subj}\n" if Debuglevel > 0
|
||||
print "message id: #{messid}\n" if Debuglevel > 0
|
||||
print "id: #{id}\n" if Debuglevel > 0
|
||||
|
|
@ -79,7 +84,12 @@ def get_group_body_rest(subj, file=nil)
|
|||
result = []
|
||||
for i in @groups[subj]["messages"][1..@groups[subj]["messages"].length]
|
||||
print "getting article: #{i}\n" if Debuglevel > 0
|
||||
begin
|
||||
resp, id, messid, list = @nntp.body(i)
|
||||
rescue Net::NNTPReplyError
|
||||
print "Caught Net::NNTPReplyError reading article #{@groups[subj]["messages"][0]}\n"
|
||||
return false
|
||||
end
|
||||
if file
|
||||
for line in list
|
||||
file.print "#{line}\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue