still better error handling
This commit is contained in:
parent
8a31948d36
commit
06600fc0d4
3 changed files with 8 additions and 5 deletions
|
|
@ -1,6 +1,10 @@
|
||||||
# $Id$
|
# $Id$
|
||||||
# $Source$
|
# $Source$
|
||||||
|
|
||||||
|
from 0.0.6 to 0.0.7
|
||||||
|
- use exceptions for a lot of problems
|
||||||
|
- code cleanups
|
||||||
|
|
||||||
from 0.0.5 to 0.0.6
|
from 0.0.5 to 0.0.6
|
||||||
- new option -C for combined filenames eg. "subject-[filename]"
|
- new option -C for combined filenames eg. "subject-[filename]"
|
||||||
- prevent reconnect loops
|
- prevent reconnect loops
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ def get_xhdr(server, range, header)
|
||||||
end
|
end
|
||||||
unless resp.to_i >= 200 and resp.to_i < 300
|
unless resp.to_i >= 200 and resp.to_i < 300
|
||||||
print "got response #{resp} while reading group #{@group} from #{server}\n"
|
print "got response #{resp} while reading group #{@group} from #{server}\n"
|
||||||
raise XhdrError
|
raise TempError
|
||||||
end
|
end
|
||||||
rescue Net::NNTP::RuntimeError
|
rescue Net::NNTP::RuntimeError
|
||||||
print "Caught Net::NNTP::RuntimeError reading from server #{server}\n"
|
print "Caught Net::NNTP::RuntimeError reading from server #{server}\n"
|
||||||
|
|
@ -785,9 +785,7 @@ def _ydecode_file(file, outfile)
|
||||||
if b.to_i == oldpartend + 1
|
if b.to_i == oldpartend + 1
|
||||||
oldpartend = e.to_i
|
oldpartend = e.to_i
|
||||||
else
|
else
|
||||||
print "Parts not continuous! last end #{oldpartend}, begin #{b}\n"
|
raise PermError, "Parts not continuous! last end #{oldpartend}, begin #{b}\n"
|
||||||
print "Bailing out...\n"
|
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -327,7 +327,8 @@ for group in @config.keys.sort
|
||||||
mode, filename, body = get_multi(i, group)
|
mode, filename, body = get_multi(i, group)
|
||||||
end
|
end
|
||||||
output_data(i, mode, filename, body) if mode != false
|
output_data(i, mode, filename, body) if mode != false
|
||||||
rescue Article::TempError
|
rescue Article::TempError, Article::PermError
|
||||||
|
print "#{$!}\n"
|
||||||
print "Skipping article...\n"
|
print "Skipping article...\n"
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue