That is useful but is it really equivalent to error ticket issuance i.e. do 
all tickets we see as error tickets hit the routes_onerror?  What if the 
error is triggered by a scheduled task running in the background?

Thanks

On Thursday, 15 February 2018 17:43:58 UTC, Leonel Câmara wrote:
>
> I'd say the easiest way would be to use routes_on_error, you can put a 
> controller function of your application there.
>
> On you web2py directory you would make a routes.py with 
>
> routes_onerror = [
>   ('myapp/*', '/myapp/default/error')
> ]
>
>
>
> Then on default.py you could have a function like this:
>
> def error():
>     code = request.vars.code
>     ticket = request.vars.ticket
>     if code == '500':
>         # do your websocket stuff
>     return locals()  # Make sure you have a error.html for the visitor to 
> get a nice error page
>
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to