On Thu, Sep 12, 2013 at 04:43:09PM -0300, Francisco Chiotta 
<franchio...@gmail.com> wrote:
> Ok, I thought that It was possible to recover an error code or something
> like that.

   psycopg2 provides some information:
http://initd.org/psycopg/docs/module.html#exceptions
http://initd.org/psycopg/docs/errorcodes.html#module-psycopg2.errorcodes
   but SQLObject loose that information when it converts psycopg2's
exceptions to SQLObject's exceptions. I can try to extract that
information but only for SQLObject 1.5 (which is currently in
pre-release state) and only for Postgres/psycopg2 (PySQLite doesn't
return error codes, only strings; exceptions from MySQL already provide
error code in e.code attribute).
   Do you want me to provide e.code for psycopg2? I'll ask you to test
the result.

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            p...@phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to