On Thursday, December 14, 2017 at 4:10:40 AM UTC-8, Anthony wrote: > > Could be a little complicated. The relevant code is in gluon.restricted -- > see > https://github.com/web2py/web2py/blob/4f51647b2f5bd68887ddd9fe139c6bbc0fa885d4/gluon/restricted.py#L115 > . > > That is unfortunate. Would be nice to have this in a more modularized fashion, but I'll see if I can make it work.
> You could create a RestrictedError (don't raise it, though, as that will > trigger web2py's error processing). Calling the .log() method on that error > object should then generate the ticket. Note, you'll be responsible for > specifying the proper values for the "layer", "code", and "environment" > arguments to RestrictedError() (for "environment", current.globalenv should > be the proper value). > > Cool, thanks. But what about "code"? It looks like RestrictedError is mainly called from the restricted() function, and everywhere I can see that calls restricted() has a bunch of complicated logic in the same function to determine what to pass for its "ccode" argument. Is there a way to access this information from within controller code? -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.