-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: limit error traceback to one line for expected exceptions (GH10715) #10727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: limit error traceback to one line for expected exceptions (GH10715) #10727
Conversation
yep, actually should prob go thru the code and fix up cases where we are doing this (so that it shows the actual trace-back rather then the copy/pasted code-block). but that is prob some work; maybe make a new issue. |
Looks good, although my inclination is to remove one more line of the traceback:
|
@shoyer yep, that's also certainly possible. I deliberately included the first (the line) and the last line (the message), in the idea that in this way it stands out a bit clearer as an error message. But if people prefer it without line, no problem for me and easy to change. |
2e200c0
to
125476f
Compare
I prefer having just one line of the error message as @shoyer suggests. |
125476f
to
469df2d
Compare
Updated with one line (already had it done locally, but forgot to push ..) |
DOC: limit error traceback to one line for expected exceptions (GH10715)
@jorisvandenbossche doc builds are stopping since this commit any thoughts? |
Hmm, stupid I didn't look at the travis builds (it builds OK locally). Thanks for noting! It halts in enhancingperf.rst, but I did not change anything there. The only reason I could think is because there is one |
gr8 thanks! |
Revert "Merge pull request #10727 from jorisvandenbossche/sphinx-traceback
Closes #10715
This gives you an output like
for input
I think we would always want such a truncated traceback in the docs in cases that exceptions are expected, so I don't think it is needed to make it an extra new option.
I only should check for cases where the actual message spans multiple lines (now it is hardcoded to give me the last line of the error traceback)
@jreback with this we don't have to use the
code-block
s in eg whatsnew for the expect behaviour ofto_datetime