One thing that i could come up with is as follows.
The app.yaml will be sending all requests to one file, say main.py.
This main.py will handle all the requests by one class say
MainAppHandler. The MainAppHandler will be responsible to redirect the
requests to any other scripts/Classes.
We can add a try/catch block in the MainAppHandler, so in case any
error occurs within the app, the exception catching that is defined in
MainAppHandler will be called up. If however, there is a local catch,
then it will be used, and no sitewide error handler will be invoked.
I am not quite sure, as to how far this approach will work correctly.
This is how i plan to use the app.yamn, main.py and MainAppHandler :--
--- file =app.yaml
url: /.*
script: main.py
-- file = main.py
class MainAppHandler(webapp.RequestHandler):
def get(self):
try:
# Based on URL, redirection to other scripts
except:
# Error handler based on the type of error
application = webapp.WSGIApplication([('/.*', MainAppHandler),],
debug=True)
This is just a vague thought. I believe, discussions will help us in
getting something fruitful.
Cheers,
Pranav Prakash
On May 4, 1:28 pm, Pranny <[email protected]> wrote:
> Hi,
>
> I was thinking about a global error handler function. This global
> error handler will be catching any error/exception that occurs inside
> the application. In case there is a *local* error handler, it will
> over ride the *global* one.
>
> 1. Is it feasible?
> 2. If yes, how ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---