[IPython-dev] Nicer display of exceptions with ipython1

Fernando Perez fperez.net at gmail.com
Tue Jul 22 04:20:43 EDT 2008

On Sun, Jul 20, 2008 at 4:47 PM, Brian Granger <ellisonbg.net at gmail.com> wrote:

>> We need to figure out how this is done. I'll ask Fernando tomorrow.
> Sounds good, I think he knows that code much better than I do.

Done.  There's a parameter in the traceback handlers for the number of
stack frames to skip.

>>> Also, isn't this what the callback would have to do anyway?  If so,
>>> that logic should just be in the traceback_trap itself.
>> Well, the callback could do more. In an IDE, for instance, you could have
>> an option to open the relevant file in an editor, or open a debugger, or
>> a stack inspector. This is why I am thinking of a callback. I can hardly
>> see how to account for all these possibilities without either resort to
>> some obfuscated code, or using a callback. Maybe I am missing the
>> obvious.
> Ah, yes, now I see why something like a callback would be nice.  But I
> don't think we should do that only instead of figuring out how to get
> a nicer traceback.  We should probably do both.

Extending the exception handling API to  optionally take a callback is
certainly possible, and I can see valid uses for it.



More information about the IPython-dev mailing list