Ján ONDREJ (SAL) wrote: > On Nov 10, 1:49 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> On Monday 10 November 2008 12:00:29 Ján ONDREJ (SAL) wrote: >> >>> Can somebody give me an example, how to handle database errors (like >>> unique key exceptions or foreign key problems) in current TG2? I have >>> one project in TG1, which has been updated to run under TG2. I like >>> news in TG2, but I really need to handle SQL problems some nice way >>> and don't raise standard error without any description, which is >>> default in TG. >>> >> I didn't read that out of your last email, but re-reading them now makes >> things clearer for me. >> >> I've hit by that myself - unfortunately, this is actually a limitation of >> SQLAlchemy. >> > > I don't agree. It is not a problem of SQLAlchemy, but it's a problem > of current version of TurboGears. > My application is working well on TurboGears 1.0.7 and worked also on > some TurboGears (I think an alfa, but I am not sure which). > Just it's not working with TurboGears2-1.9.7b1, when > ZopeTransactionExtension is ON. > Note that ZTE is not mandatory. You can remove it from your DBSession and handle transactions manually as you were doing before. I'd recommend however to try to use the zope transacion API to handle them (as I suggested earlier in this thread) since some TG extensions in the future might rely on it (eg: to take advantage of its two-phase-commit semantics when dealing several data backends, say a ldap store, filesystem....)
Alberto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
