def redirect_to_handler(error, location):
if callable(location):<EOL><INDENT>location = location()<EOL><DEDENT>request.environ['<STR_LIT>'] = '<STR_LIT:GET>'<EOL>redirect(location, internal=True)<EOL>
Cause a requset with an error to internally redirect to a URI path.

This is generally for internal use, but can be called from within a Pecan
controller to trigger a validation failure from *within* the controller
itself, e.g.::

    @expose()
    @validate(some_schema, '/some/handler')
    def some_controller(self, **kw):
        if some_bad_condition():
            error_exception = ...
            redirect_to_handler(error_exception, '/some/handler')