"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Hello guys. I have this question: When handling IntegrityError > exceptions (for example, when using the alternateID position > parameter), do I have to import this exception from psycopgp2 (I'm > using postgres as a database), or is it available somewhere in the > packages of SQLObject? (haven't found it yet).
If you import it then you loose portability. What you can do is get it from the driver... One way (I believe there's a simpler one somewhere else around here, but I haven't found it) is: ================================================================================ driver = model.hub.getConnection()._dbConnection.module try: # ... except driver.IntegrityError, error: # ... ================================================================================ -- Jorge Godoy <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

