Skip to content

omit stack traces from particular files prototype#5

Open
ivanov wants to merge 1 commit into
3.2.0from
for-adam
Open

omit stack traces from particular files prototype#5
ivanov wants to merge 1 commit into
3.2.0from
for-adam

Conversation

@ivanov

@ivanov ivanov commented Jul 16, 2015

Copy link
Copy Markdown
Owner

@NorthIsUp

there are two places to make changes - one for the stack trace as it is
printed by ipython on error, the other as it is printed by ipdb.

you can verify that it works like this: (note the missing tmp.py entries)

In [1]: !cat tmp.py                                                                                                                                                                                                                                                                                                                                                                                                  
import bar

def foo_test():
    bar_test()

def bar_test():
    bar.foo_bar()



In [2]: !cat bar.py

def foo_bar():
    1/0

In [3]: import tmp

In [4]: tmp.foo_test()
---------------------------------------------------------------------------
ZeroDivisionError                         Traceback (most recent call last)
<ipython-input-4-f50710bfc43f> in <module>()
----> 1 tmp.foo_test()

/Users/pi/code/ipython/bar.pyc in foo_bar()
      1 
      2 def foo_bar():
----> 3     1/0

ZeroDivisionError: integer division or modulo by zero

In [5]: debug
> /Users/pi/code/ipython/bar.py(3)foo_bar()
      1 
      2 def foo_bar():
----> 3     1/0

ipdb> w
  <ipython-input-4-f50710bfc43f>(1)<module>()
----> 1 tmp.foo_test()



> /Users/pi/code/ipython/bar.py(3)foo_bar()
      1 
      2 def foo_bar():
----> 3     1/0

ipdb> 

there are two places to make changes - one for the stack trace as it is
printed by ipython on error, the other as it is printed by ipdb
@ivanov

ivanov commented Jul 16, 2015

Copy link
Copy Markdown
Owner Author

more context: this proof-of-concept traceback filtering based on filenames

ivanov pushed a commit that referenced this pull request Oct 21, 2016
Remove forgotten print statements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant