Try except code block to catch SQLALchemy MySQL connection error if login details are wrong

preview_player
Показать описание
We can use try except block to capture error message if any while connecting to MySQL database.

We need to import the SQLAlchemyError module.
Keep the connection string before the try and keep the connect() inside the try block.
Рекомендации по теме
Комментарии
Автор

Not only is this video not instructive, the code won''t work because error is not defined. Try testing your example code and give us some narration instead of bad techno.

daviclor
visit shbcf.ru