On Jul 23, 2007, at 4:35 PM, kwarg wrote:

>
> SQLAlchemy has "wanderful" documentation in many perspectives ... Does
> anybody know what is the interface of sqlalchemy.exceptions.SQLError
> exception? I mean properties/attributes/methods.
> The following is totally useless:
> http://www.sqlalchemy.org/docs/ 
> sqlalchemy_exceptions.html#docstrings_sqlalchemy.exceptions_SQLError
> What are those so called "accessors"? I need in particular the SQL
> code and the message.
> Thanks a lot.

current interface is:

     def __init__(self, statement, params, orig):
         self.statement = statement
         self.params = params
         self.orig = orig

the error thrown by your DBAPI is then available as error.orig .

as far as breaking up SQL code and message, most DBAPI's dont seem to  
provide individual fields for this (I think some do, but we havent  
narrowed down how to get at them for each specific dialect; thats  
ticket # 295). 
  

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

Reply via email to