If an exception is raised in a try block, the rest of the block is skipped and the except block is executed.
(This would probably better in the python group, or, since this has nothing to do with App Engine, an entirely different python group.) On Sep 25, 9:56 am, kevin wu <[email protected]> wrote: > I have a question > > try: > print 'before gql' > account = model.User.gql('WHERE email = :1', db.Email(textEmail.strip > ()) ).get() > print 'after gql' #<-- it will be gone > foo(account) > catch: > print 'error' > > >>before gql > >>error > > so I change my code this way > > print 'before gql' > account = model.User.gql('WHERE email = :1', db.Email(textEmail.strip > ()) ).get() > print 'after gql' > foo(account) > > >>before gql > >>after gql > > Traceback (most recent call last):...... > > Why is 'after gql' gone in the first case? > It cause some problems if I use try-catch and log to debug..... > > thx > > I need some help. Can tell me the reasons? thx a lot --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
