Traceback not going all the way to the exception?

Discussion in 'Python' started by sert, Oct 9, 2008.

  1. sert

    sert Guest

    I just got an exception and the traceback wouldn't go all the
    way to the statement that threw the exception. I found that out
    by using the debugger.

    Contrast the traceback:

    http://tinyurl.com/5xglde

    with the debugger output (notice the arrow pointing to the last
    statement the traceback showed and how the execution went on
    beyond it):

    http://tinyurl.com/3fjgrl

    Is this a known issue or should I submit a bug report?
     
    sert, Oct 9, 2008
    #1
    1. Advertising

  2. sert

    Terry Reedy Guest

    sert wrote:
    > I just got an exception and the traceback wouldn't go all the
    > way to the statement that threw the exception. I found that out
    > by using the debugger.
    >
    > Contrast the traceback:
    >
    > http://tinyurl.com/5xglde
    >
    > with the debugger output (notice the arrow pointing to the last
    > statement the traceback showed and how the execution went on
    > beyond it):
    >
    > http://tinyurl.com/3fjgrl
    >
    > Is this a known issue or should I submit a bug report?


    You forgot to specify which version of Python on which computer system.
    I do not remember anything like this. You can search the items at
    bugs.python.org. If no one explains this, I suggest a bug report.
     
    Terry Reedy, Oct 9, 2008
    #2
    1. Advertising

  3. On Oct 9, 3:27 am, sert <> wrote:
    > I just got an exception and the traceback wouldn't go all the
    > way to the statement that threw the exception. I found that out
    > by using the debugger.
    >
    > Contrast the traceback:
    >
    > http://tinyurl.com/5xglde
    >
    > with the debugger output (notice the arrow pointing to the last
    > statement the traceback showed and how the execution went on
    > beyond it):
    >
    > http://tinyurl.com/3fjgrl
    >
    > Is this a known issue or should I submit a bug report?


    Could be you are re-raising an exception by hand instead of with the
    bare 'raise' statement. Notice the difference in tracebacks shown
    here:

    >>> def f():

    .... try:
    .... g()
    .... except Exception, e:
    .... raise e
    ....
    >>> def g():

    .... raise Exception("abc")
    ....
    >>> f()

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "<stdin>", line 5, in f
    Exception: abc
    >>> def f():

    .... try:
    .... g()
    .... except Exception, e:
    .... raise
    ....
    >>> f()

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "<stdin>", line 3, in f
    File "<stdin>", line 2, in g
    Exception: abc
    >>>
     
    Aaron \Castironpi\ Brady, Oct 9, 2008
    #3
  4. sert

    sert Guest

    Terry Reedy <> wrote in
    news::

    > You forgot to specify which version of Python on which
    > computer system.
    >


    It's on Python 2.6.
     
    sert, Oct 9, 2008
    #4
  5. sert

    sert Guest

    sert <> wrote in
    news:Xns9B3376461E33jtjdfjdfjnbj@147.102.222.230:

    > It's on Python 2.6.
    >


    On Windows.
     
    sert, Oct 9, 2008
    #5
    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. Jan Decaluwe
    Replies:
    0
    Views:
    311
    Jan Decaluwe
    Nov 7, 2003
  2. Joe Peterson
    Replies:
    4
    Views:
    303
    Joe Peterson
    Jul 5, 2005
  3. Saizan
    Replies:
    5
    Views:
    336
    Fabio Zadrozny
    Feb 2, 2006
  4. WaterWalk

    unicode in exception traceback

    WaterWalk, Apr 3, 2008, in forum: Python
    Replies:
    2
    Views:
    449
    WaterWalk
    Apr 3, 2008
  5. Jack Bates
    Replies:
    0
    Views:
    280
    Jack Bates
    May 2, 2011
Loading...

Share This Page