I want to ask about engine in SQLAlchemy.
Here's my code:
try:
engine = create_engine('postgres://postgres:pass@localhost:5432/db')
engine.connect()
except DatabaseError:
print('Database Error : ', sys.exc_info()[1])
How can I catch an exception for a specific error like "database does not exist" or "wrong password/user name", etc.