Hello everyone,
How do you handle errors in SQLAlchemy? I am relatively new to SQLAlchemy and do not know yet.
Before I used SQLAlchemy, I would do things like
status = db.query("INSERT INTO users ...")
if (!status):
raise Error, db.error
But now I am coding in SQLAlchemy and I do things like
user = User('Boda Cydo')
session.add(user)
session.commit()
No error checking whatsoever!
I do not like this coding style without error checking at all.
Please advice on how to check and handle errors in SQLAlchemy!
Sincerely, Boda Cydo.