Not sure it will help much, but you can customize the default static 
response.

On Friday, April 29, 2011 3:19:12 AM UTC-4, selecta wrote:

> true, there is no loop, but there is also no real fallback 
> i get something like 
> you are redirected here <- very long link (error->error->error->....) 
> this could be a bit nicer 
>
> On Apr 28, 8:26 pm, Anthony <[email protected]> wrote: 
> > Also, note that I don't think a failure of routes_onerror will result in 
> an 
> > infinite loop if there's an error in a model file. According to the 
> > routes_example.py file, if the error handling page itself returns an 
> error, 
> > web2py will fall back to it's default static response. So, with an error 
> in 
> > models, you won't get your custom error page, but you shouldn't get a 
> loop 
> > either. 
> > 
> > Anthony 
> > 
> > 
> > 
> > On Thursday, April 28, 2011 1:48:55 PM UTC-4, selecta wrote: 
> > > hmm well ic, i guess this still not so bad 
> > > i will create two modes, 
> > > 1) development mode that show the tickets directly (using app admin) 
> > > 2) production mode that create custom error messages by redirecting to 
> > > the controller function (that also checks if this error was already 
> > > attached to an issue that can be dispalyed) 
> > > in production mode there should not be any errors in models, since the 
> > > whole app would not work 
> > > any objections to this logic? 
> > 
> > > On Apr 28, 4:02 pm, Anthony <[email protected]> wrote: 
> > > > You can redirect to static error pages, but assuming that's not what 
> you 
> > > > want, I suppose the only alternative would be to have the errors 
> handled 
> > > by 
> > > > a separate application. 
> > 
> > > > Anthony 
> > 
> > > > On Thursday, April 28, 2011 5:42:54 AM UTC-4, selecta wrote: 
> > > > > i am currently writing an issue tracker, that works already quite 
> > > > > nicely 
> > > > > however I have a big problem 
> > 
> > > > > I want the issue tracker to create custom error messages 
> > > > > i learned that you can do this by modifying routes.py 
> > > > > routes_onerror = [ ('pyMantis/500', '/pyMantis/plugin_issue/ 
> > > > > error_ticket') ] 
> > 
> > > > > this works quite well ... as long as the error is not in a model 
> > > > > since all models are executed before the view is shown this leads 
> to 
> > > > > an infinite loop :( 
> > > > > is there a way to prevent this problem (e.g. different route on 
> model 
> > > > > errors?) 
> > 
> > > > > btw a demo can be seen here 
> > > > >http://pymantis.org/pymantis_server/plugin_issue/index

Reply via email to