forked from LiveCarta/BookConverter
Print errors if creds aren't correct
This commit is contained in:
@@ -65,8 +65,10 @@ def callback(ch, method, properties, body: bytes, main_logger: logging.Logger, l
|
||||
# print(f"Active threads: {active_count()}.")
|
||||
except Exception as exc:
|
||||
if hasattr(exc, "message"):
|
||||
print(f"{sys.exc_info()[0]}: {exc.message}")
|
||||
main_logger.error(f"{sys.exc_info()[0]}: {exc.message}")
|
||||
else:
|
||||
print(f"{sys.exc_info()[0]}: {str(exc)}")
|
||||
main_logger.error(f"{sys.exc_info()[0]}: {str(exc)}")
|
||||
finally:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user