Thanks for that one Marco, works for me too!

On 29 jan, 11:43, Marco Mariani <[email protected]> wrote:
> On 01/29/2010 11:23 AM, [email protected] wrote:
>
>
>
> >       I *think* this is because you need to have the name SQLAlchemy
> >       defined in the
> >       module you define the handler in. So do you import it in your
> >       controller
> >       file?
>
> This was how it behaved some time ago.
>
> Actually, in TG 1.1b3 - the one I'm using - I have to add stuff to the
> tg.errorhandling module, in order for it to be recognized inside the
> exception_handler
>
> Just call this, somewhere:
>
> import turbogears as tg
> import sqlalchemy as sa
>
> tg.errorhandling.SQLAlchemyError = sa.exceptions.SQLAlchemyError
>
> works for me
>
> --
> This e-mail (and any attachment(s)) is strictly confidential and for use only 
> by intended recipient(s). Any use, distribution, reproduction or disclosure 
> by any other person is strictly prohibited. The content of this e-mail does 
> not constitute a commitment by the Company except where provided for in a 
> written agreement between this e-mail addressee and the Company. If you are 
> not an intended recipient(s), please notify the sender promptly and destroy 
> this message and its attachments without reading or saving it in any manner. 
> Any non authorized use of the content of this message constitutes a violation 
> of the obligation to abstain from learning of the correspondence among other 
> subjects, except for more serious offence, and exposes the person responsible 
> to the relevant consequences.

-- 
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?hl=en.

Reply via email to