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

[new] exceptions flow - @throws declaration for non-thrown exceptions #44

Closed
bram123 opened this issue Nov 14, 2016 · 8 comments
Closed

Comments

@bram123
Copy link

bram123 commented Nov 14, 2016

It would be useful to show a warning when a function/method has @throws in the docblock, but no actual Exceptions are (possibly) thrown.

This wouldn't be possible when the method is overloaded. Because a parent might want to document that a child can throw an exception.

@bram123 bram123 changed the title incorrect @throws in docblock Inspect incorrect @throws in docblock Nov 14, 2016
@kalessil kalessil changed the title Inspect incorrect @throws in docblock [new] exceptions flow - @throws declaration for non-thrown exceptions Nov 14, 2016
@kalessil
Copy link
Owner

kalessil commented Dec 5, 2016

I'll pick it up for the next release.

@kalessil
Copy link
Owner

@bram123 , from your prospect, what is more important - this issue or #66 ?

@bram123
Copy link
Author

bram123 commented Dec 14, 2016

@kalessil For us, this issue is more important.

Btw, thanks for the hard work; plugin is a great help :)

@kalessil
Copy link
Owner

@bram123 : would you please give a try to the new build (you'll need to activate the feature in the inspection settings)

You are welcome, it become very handy now as I noticed myself)

@bram123
Copy link
Author

bram123 commented Dec 16, 2016

Just downloaded the latest version (2.2.2) from github. But I can't find the setting to enable this.

@kalessil
Copy link
Owner

kalessil commented Dec 16, 2016

That's here: (checkbox "Report non-thrown exceptions", it deactivated by default)
ea-report-non-thrown

@bram123
Copy link
Author

bram123 commented Dec 16, 2016

Thanks, works great so far :)

@kalessil
Copy link
Owner

Great, have fun with new features)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants