Standardize exception message prefix

main
Bob Mottram 2022-02-03 10:39:52 +00:00
parent bae77c61a0
commit 387f68acc9
3 changed files with 4 additions and 4 deletions

View File

@ -176,7 +176,7 @@ def _mark_post_as_read(actor: str, post_id: str, post_category: str) -> None:
read_file.seek(0, 0)
read_file.write(post_id + content)
except Exception as ex:
print('WARN: Failed to mark post as read' + str(ex))
print('EX: Failed to mark post as read' + str(ex))
else:
with open(read_posts_filename, 'w+') as read_file:
read_file.write(post_id + '\n')

View File

@ -54,8 +54,8 @@ def _update_feeds_outbox_index(base_dir: str, domain: str,
feeds_file.seek(0, 0)
feeds_file.write(post_id + '\n' + content)
print('DEBUG: feeds post added to index')
except Exception as ex:
print('WARN: Failed to write entry to feeds posts index ' +
except BaseException as ex:
print('EX: Failed to write entry to feeds posts index ' +
index_filename + ' ' + str(ex))
else:
try:

View File

@ -1213,7 +1213,7 @@ def get_rs_sfrom_dict(base_dir: str, newswire: {},
published = published_with_offset.strftime("%Y-%m-%dT%H:%M:%SZ")
try:
pub_date = datetime.strptime(published, "%Y-%m-%dT%H:%M:%SZ")
except Exception as ex:
except BaseException as ex:
print('WARN: Unable to convert date ' + published + ' ' + str(ex))
continue
rss_str += \