On 12/5/06, g <[EMAIL PROTECTED]> wrote: > > I'm trying to catch an SQLError that is raised due to a "Duplicate > Entry" being inserted into a unique field in the db. > > I'm getting a "500 Internal error" when what I really want to do is > catch it within the code. >
This is because TurboGears wraps all of your methods with an implicit transaction so a commit is being called whenever the one of your methods is done (which is not desirable in some cases). Check out this thread[1] on the TG list for a recent solution to this on a per-method basis. [1]: http://tinyurl.com/yn99b3 -- Lee McFadden blog: http://www.splee.co.uk work: http://fireflisystems.com skype: fireflisystems --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---