Thanks Simon,

I don't know exactly what sanity test you refer to, but I did set-up a
new projet using tg-admin and it seems to work. I looked at the various
docs and lists, but I didn't see embedded sanity tests.
Have you any reference ?
Otherwise, I changed the way of declaring the error handler and I do it
like that:

@turbogears.expose(html="newgears.templates.confirmation")
        @turbogears.validate(validators={ "mailAdresse" : validators.Email()}
        @turbogears.error_handler(inscriptionEh(self, tg_errors,
tg_source, *args, **kw))
       def myPage.... here the main page prcessing and after:

       def inscriptionEh(self, tg_errors, tg_source, *args, **kw):
               code of my handler

System report at TG launching:
           NameError: name 'inscriptionEh' is not defined
Could you confirm that the way I declare the error handler is correct ?
I had a look at the link you gave me previously and I came this
conclusion.
I am looking for a full code exemple  that works, but I have'nt found
so far.

Thanks for your help
Arnold



Simon Belak wrote:
> As I have said before, the correct way of doing it is:
>
>       def validation_error(self, tg_source, tg_errors, *args, **kw):
>
> If this does not work, try running tests on you TG installation, if
> there are no failures reported, you are messing up error handling
> somewhere in your code.
>
> Cheers,
> Simon
>
> Arnold wrote:
> > So far my best results are with:
> >
> >     def validation_error(self, func, errors, *args, **kw):
> >             appliLogger.debug("Validator_error func : "+ func)
> >             appliLogger.debug("Validator_error kw : "+ str(kw))
> >             appliLogger.debug("Validator_error args : "+ str(args))
> >             appliLogger.debug("Validator_error errors : "+ str(errors))
> >
> > and the log is:
> > 2006-07-03 21:11:51,985 DEBUG Validator_error func : suscribe
> > 2006-07-03 21:11:51,985 DEBUG Validator_error kw : {}
> > 2006-07-03 21:11:51,986 DEBUG Validator_error args : ({'age':
> > <formencode.api.Invalid instance at 0xb7387f2c>},)
> > 2006-07-03 21:11:51,987 DEBUG Validator_error errors : {}
> >
> > This link is not available at the moment, but I will visit it as soon
> > as it is on again.
> > http://trac.turbogears.org/turbogears/wiki/HowDoesErrorHandlingWork
> > But all that seems to be more less buggy...
> >
> > Cheers
> > Arnold
> > Arnold
> > I can't get parameters in
> > 
> > 
> > > 
> >


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

Reply via email to