Skip to content
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

Replace trivial uses of rethrow(exc) with rethrow() #29794

Merged
merged 1 commit into from
Oct 29, 2018
Merged

Conversation

c42f
Copy link
Member

@c42f c42f commented Oct 24, 2018

In all these cases we're merely rethrowing the existing exception, so it
seems simpler and clearer just to use rethrow() without arguments.

Now that #28878 is merged this should actually be reliable.

@c42f c42f mentioned this pull request Oct 24, 2018
11 tasks
@ararslan ararslan added the error handling Handling of exceptions by Julia or the user label Oct 24, 2018
@c42f
Copy link
Member Author

c42f commented Oct 26, 2018

Well, CI passes and I've double checked these replacements several times by eye.

I'll merge this change in a couple of days if nobody objects; it's long but quite straightforward.

@c42f
Copy link
Member Author

c42f commented Oct 26, 2018

@KristofferC I realized I've got some changes to stdlib/Pkg here but that might not make sense given that Pkg development is separate. What is the recommended development workflow?

@fredrikekre
Copy link
Member

What is the recommended development workflow?

Submit a PR to the Pkg repo.

In all these cases we're merely rethrowing the existing exception, so it
seems simpler and clearer just to use `rethrow()` without arguments.
@c42f
Copy link
Member Author

c42f commented Oct 26, 2018

Thanks, I've reverted the changes in stdlib/Pkg, will submit upstream.

@c42f c42f merged commit 453a7dd into master Oct 29, 2018
@c42f c42f deleted the cjf/rethrow-cleanup branch October 29, 2018 02:06
bors bot added a commit to JuliaLang/Pkg.jl that referenced this pull request Nov 1, 2018
873: Replace trivial uses of rethrow(exc) with rethrow() r=fredrikekre a=c42f

In all these cases we're merely rethrowing the existing exception, so it
seems simpler and clearer just to use `rethrow()` without arguments.

Companion to JuliaLang/julia#29794

Co-authored-by: Chris Foster <[email protected]>
Keno pushed a commit that referenced this pull request Jun 5, 2024
In all these cases we're merely rethrowing the existing exception, so it
seems simpler and clearer just to use `rethrow()` without arguments.

Previously it wasn't reliable to use `rethrow()` like this but the exception
stack system from #29794 has fixed those problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error handling Handling of exceptions by Julia or the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants