Static code analysis issues

Hi,

I'm attaching here an example with 2 issues:

1) I am calling a method that returns an object with a "catch" method but webstorm doesn't seem to recognize it

2) webstorm gives error about an unused variable though it might be used

Sample project can be downloaded from here:

https://expirebox.com/download/283aed504ff362491d09b6f368788c7c.html

 

Attaching a screenshot below:

Thx!

 

 

0
3 comments

1. logged as https://youtrack.jetbrains.com/issue/WEB-26937, please vote for it

2. well, but I doesn't actually see where the first assignment

step = 'asyncOper1';

 is being used...

 

0
Avatar
Permanently deleted user

Line 20 is actually an async call, if that call will return an error then the "catch" section is going to get called (line 28) and it will log "step" which will be "asyncOper1".

You can see it in action if you change line 5 to:

cb(new Error('aaaa'));

0

Please sign in to leave a comment.