Skip to content

REF: re-raise AssertionError unchanged #28959

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

Merged
merged 3 commits into from
Oct 16, 2019

Conversation

jbrockmendel
Copy link
Member

This should be all the remaining places where we catch Exception in groupby/apply/resample code. This should make debugging much easier going forward.

cc @jreback @WillAyd

@@ -251,6 +251,8 @@ def aggregate(self, func=None, *args, **kwargs):

try:
return self._python_agg_general(func, *args, **kwargs)
except AssertionError:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm what's the point of the bare raise here? I get needed to differentiate now from the except Exception, but coupled with change above is there something actually throwing the AssertionError? Or do we mean to be catching ValueError here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but coupled with change above is there something actually throwing the AssertionError

No, which means that during development we can now add assertions and not have them get swallowed.

@jreback jreback added the Error Reporting Incorrect or improved errors from pandas label Oct 16, 2019
@jreback jreback added this to the 1.0 milestone Oct 16, 2019
@jreback
Copy link
Contributor

jreback commented Oct 16, 2019

lgtm. pls rebase

@jbrockmendel
Copy link
Member Author

rebased+green

@WillAyd WillAyd merged commit 143eb38 into pandas-dev:master Oct 16, 2019
@WillAyd
Copy link
Member

WillAyd commented Oct 16, 2019

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the faster_assertion branch October 16, 2019 23:41
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
bongolegend pushed a commit to bongolegend/pandas that referenced this pull request Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants