Improved error handling
This commit is contained in:
parent
588a3c3ea6
commit
ff68b5f70f
1 changed files with 9 additions and 2 deletions
|
@ -664,7 +664,14 @@ def main():
|
|||
download(postFromLog(logDir))
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
POSTS = getPosts(prepareAttributes())
|
||||
except Exception as exc:
|
||||
logging.error(sys.exc_info()[0].__name__,
|
||||
exc_info=full_exc_info(sys.exc_info()))
|
||||
print(log_stream.getvalue(),noPrint=True)
|
||||
print(exc)
|
||||
sys.exit()
|
||||
|
||||
if POSTS is None:
|
||||
print("I could not find any posts in that URL")
|
||||
|
|
Loading…
Reference in a new issue