Join GitHub today
Exceptions in #before block are not caught by error handler #812
I've noticed in Padrino 0.10.5 that exceptions raised from a #before block do not invoke the user-defined error handlers, e.g.
I attempted to upgrade to 0.10.6 to see if the problem still exists, however my application completely broke, that's a separate issue though, so I'll have to assume the behavior is unchanged in 0.10.6 unless someone can prove otherwise.
My configure blocks were being executed before any of dependencies (models, library file) were loaded. 0.10.5 loaded everything before the configure blocks were run, after all the whole point of a configure block is to configure the application environment which includes application dependencies.
Anyway I'm more concerned about the issue with before block errors not being caught. Something else I've noticed is that if a route raises an exception, before blocks are called again. So they're called once at the start of the request, and then called again whenever an error occurs. This may be part of the same issue as this doesn't seem like the intended behavior.