slack-php-api icon indicating copy to clipboard operation
slack-php-api copied to clipboard

Method does not specify that exception might be thrown.

Open Legion112 opened this issue 4 years ago • 1 comments

image Here I expect to see throws doc block to make my Static Analyze Tool help me to process the error.

Legion112 avatar Sep 17 '21 15:09 Legion112

executeEndpoint might throw exception

Legion112 avatar Sep 17 '21 15:09 Legion112

Hello,

Maintaining @throw PHPDoc is very time consuming for maintainers. And this issue did not get much tractions.

So I think we can close this issue.

Anyway, thanks for raising your point.

lyrixx avatar Apr 19 '23 11:04 lyrixx

Why is it hard to maintain? Configuring a static analyzer inside the project will force you to explicitly write throw doc block to improve library usability.

I disagree that it is hard to maintain. if this will be part of the pipeline, it will be quite easy for anyone who works on code in the library to correct their pull request.

I might suspect if the code here completely generates might be the right place to ask for throw doc block is code generation tool.

Legion112 avatar Apr 19 '23 13:04 Legion112

We had a similar request on another repo and we deciced to not add them.

I let you read the answer there.


And as you said, almost all code here a generated. So the issue should be open in the other repo.

I'm closing. Thanks for your understanding

lyrixx avatar Apr 19 '23 14:04 lyrixx