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

Annotation: @alwaysThrows #17999

Closed
kevmoo opened this Issue Apr 3, 2014 · 8 comments

Comments

Projects
None yet
4 participants
@kevmoo
Copy link
Member

kevmoo commented Apr 3, 2014

It's often nice to have a _fail() method or similar.

Often if it's used in a method with a return type, the analyzer will warn about a missing return type.

Solution:

@alwaysThrows (or similar) on a method definition

  1. Analyzer confirms that all code paths through the method throw (as opposed to no-op or return)
  2. Effectively replaces an inline throw in code, eliminating the "does not end in a return statement" hint
@bwilkerson

This comment has been minimized.

Copy link
Member

bwilkerson commented Apr 3, 2014

Added this to the 1.4 milestone.
Removed Priority-Unassigned label.
Added Priority-Medium, Area-Analyzer labels.

@bwilkerson

This comment has been minimized.

Copy link
Member

bwilkerson commented Apr 3, 2014

Removed this from the 1.4 milestone.
Added this to the Later milestone.

@kasperl

This comment has been minimized.

Copy link
Contributor

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl

This comment has been minimized.

Copy link
Contributor

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@srawlins

This comment has been minimized.

Copy link
Member

srawlins commented Apr 20, 2016

This is filed under analyzer, but the implementation would also involve package:meta, right?

@bwilkerson

This comment has been minimized.

Copy link
Member

bwilkerson commented Apr 20, 2016

Yes, but the authors are the same, so...

@srawlins

This comment has been minimized.

Copy link
Member

srawlins commented Apr 20, 2016

Fair enough. Just understanding the implementation. I guess there's no "area-meta" label.

@srawlins

This comment has been minimized.

Copy link
Member

srawlins commented Jun 13, 2017

Committed.

@srawlins srawlins closed this Jun 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment