Hi,

I've the following which generates an insert:

try:
    MyDBLog(
        myfield='A too long string xxxxxxxxxxxx'
    )
except Exception, e:
    log.error("Exception occurred with database logging: %s" % e)


Unfortunately, 'myfield' is (for example) a string of only length 10,
so the session fails with
    ProgrammingError: (ProgrammingError) value too long for type
character varying(10)

This error occurs at session commit time, so my 'except' clause above
is useless.

As 'MyDBLog' is not critical, I want to be able to ignore/log any kind
of Exception which the 'try' block above ultimately generates.  Is
there a way to do this?

Thanks!

Eoghan
--~--~---------~--~----~------------~-------~--~----~
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