> I am thinking of changing the fail-safe mechanism of error handling [1],
> making it independent of the rest of the validation process, with
> continuations as the new recommended pattern:
> 
>    def failsafe(controller, schema, tg_source, tg_errors, tg_exception,
> *args, **kw)
>      return tg_source(controller, *args, *schema(kw))
> 
>    @expose()
>    @validate(...)
>    @error_handler(bind_args(schema=map_errors)(failsafe))
>    def my_method(self, *args, **kw)
>      ...
> 
> failsafe() and bindings for core schemas would be included in
> errorhandling.py so actual code would be (in most cases) less verbose.
> 
> What do you think?

I'm feeling dumb looking at the code like this. 
At times I think Python 1.5.2 was "better". ;-)
 
I'm using failsafe in just one controller so not particularly concerned with 
backward-incompatible changes.


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

Reply via email to