Hello all!

I have a question about handling errors in SQLAlchemy.

Before I used SQLAlchemy I used to rigorously check for all errors
when executing queries, like:

> status = db.query("INSERT INTO users ...")
> if !status:
>   handle_insert_error()

But now when I have switched to SQLAlchemy I write code with no error
checking whatsoever, like:

> user = User("Boda Cydo")
> session.add(user)
> session.commit()

And I do absolutely no error checking. I absolutely feel horrible for
writing such code.

I talked in #sqlalchemy and someone told me that SQLAlchemy throws
exceptions on errors. That's better. But where is it documented? The
person couldn't find anything. Neither could I.

Can anyone please help with tips (or point me to documentation) about
what exceptions get raised when?

I absolutely don't want to write code without error handling.


Thanks,
Boda Cydo

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to