-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH/API: Keep original traceback in DataFrame.apply #4549
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
ENH/API: Keep original traceback in DataFrame.apply #4549
Conversation
can you set up travis ci and add a test? thx |
I set up Travis CI, but it won't run until I push a new commit (which I'll do once I add a test). As for the test, do you have any pointers on how one might be able to test that a traceback is the appropriate one? I'm not sure how one might go about doing this so any tips will be very helpful. |
We discussed this before in #4254 (which is talking about the same issue - but didn't get set up for Travis). Don't really need to have a test case for traceback, because it's not really something you can or should test. |
right...now i remember. ok then |
Ok, in that case how do I force Travis to run since there's nothing new to commit? Should I delete this pull request/commit and start over? It looks like Travis is set up OK with my account as far as I can tell. |
will reset the commit hash |
Done. Let me know if you need anything else. Looks like the build passed. |
@bburan-galenea I know this is trivial, but can you put a release notes mention ? (so we don't forget when this was actually changed)? thanks...then can merge |
Certainly. Do you mean edit https://github.com/pydata/pandas/blob/master/doc/source/release.rst and add a note under "bug fixes"? |
@bburan-galenea yes, that's correct. |
When "raise <exception instance>" is used inside a try/except block, the original stacktrace (containing the code path that raised the original exception). This makes debugging difficult since all we know is that an error occured when `frame._apply_standard` attempted to call the provided function. Preserve the original stacktrace by using "raise" instead of "raise <exception instance>". This facilitates debugginb by allowing us to see where (in the provided callable) the exception occured. Added mention of this change in release notes
Ok, I added the note to release.rst and squashed the commits together. |
can you add the original issue in the release notes as well, #4254? which this PR will close |
never mind, that is another PR that looks like a dup of yours (or maybe yours is a dupe of his!) either way... |
Thanks! |
…eption_traceback ENH/API: Keep original traceback in DataFrame.apply
thank you sir! keep em coming |
When "raise " is used inside a try/except block, the
original stacktrace (containing the code path that raised the original
exception). This makes debugging difficult since all we know is that an error
occured when
frame._apply_standard
attempted to call the provided function.Preserve the original stacktrace by using "raise" instead of "raise ". This facilitates debugginb by allowing us to see where (in the
provided callable) the exception occured.