Re: exception problem

Discussion in 'Python' started by Chris Angelico, Jun 25, 2012.

  1. On Tue, Jun 26, 2012 at 1:14 AM, Charles Hixson
    <> wrote:
    > I read that that would happen, but "  print (sys.exc_info()[:2]) " didn't
    > even yield a blank line.  It must have executed, because the print statement
    > on the line before it executed, and there wasn't a loop or a jump (and also
    > execution continued "normally" [the code still has bugs] afterward even if
    > the finally isn't included).


    Unless it threw an exception, such as NameError if you haven't
    imported sys. In that case, execution will continue through the
    'finally' clause and then raise the exception (at least, I think
    that's how it goes - raising exceptions in exception handlers is not
    something I've made a study of).

    ChrisA
     
    Chris Angelico, Jun 25, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jeff
    Replies:
    0
    Views:
    1,543
  2. jeff
    Replies:
    3
    Views:
    1,704
    Scott
    Jun 26, 2003
  3. Kerri
    Replies:
    2
    Views:
    13,065
    Kevin Spencer
    Oct 27, 2003
  4. Ola
    Replies:
    0
    Views:
    544
  5. Selen
    Replies:
    0
    Views:
    2,698
    Selen
    May 28, 2004
Loading...

Share This Page