Hello everybody,

I am writing some piece of code, which should not exit unforseen in the 
best case, at least it should write to a log file what went wrong (e.g. 
Database not reachable, etc). So I tried figuring out, which Exceptions 
would be possibly thrown by SQLAlchemy:

   - The first thing I did was googling for how to find out which 
   Exceptions could be thrown in Python. The answers I found on Stack Overflow 
   etc. were like "You simply don't", "This is Python, dumbass, you can't 
   predict which are thrown so don't even try" or "Just write tests until you 
   found them all" and "Just catch the general Exception class."
   - So I tried looking at the SQLAlchemy Documentation to see if there is 
   something written about when something goes wrong, but still no luck.
   - Before I started digging into the code I thought I'd ask here first

So is there any hint to know which Exceptions could be thrown by 
SQLAlchemy? The error cases I could think of were mostly wrrors while 
connecting to the database or having errors in queries. I would totally be 
willing to help with documenting at a certain point but even for this I 
need to know if I just did't find any documentation for this and if you 
consider this as neccessary. I feel that it is neccessary for me not just 
to kill the process with maybe a stack trace on stdout.


Cheers

Lars Liedtke

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to