Fix exception handling

This commit is contained in:
taizan-hokuto
2020-07-24 15:19:32 +09:00
parent fd1d283caa
commit e3f9f95fb1
2 changed files with 12 additions and 12 deletions

View File

@@ -333,12 +333,12 @@ class LiveChatAsync:
'''
if self.is_alive():
self.terminate()
try:
self.listen_task.result()
except Exception as e:
self.exception = e
if not isinstance(e, exceptions.ChatParseException):
self._logger.error(f'Internal exception - {type(e)}{str(e)}')
try:
self.listen_task.result()
except Exception as e:
self.exception = e
if not isinstance(e, exceptions.ChatParseException):
self._logger.error(f'Internal exception - {type(e)}{str(e)}')
self._logger.info(f'[{self._video_id}]終了しました')
def raise_for_status(self):