While working on some projects, i've found out that when i split functionality between functions, it becomes difficult to find out, which functions can throw exception.
I can add comment to function, or add some info in jsdoc, but the problem is that function may called by another function, and so on. At this point if there's many of them, i need to check every function to determine if it potentially can/can't throw exception.
Is there anything that can help with that? Maby not in JS, but in any languages. What is that called?
What i imagine myself would be helpful is if you could add some kind of tag on function that can throw.
And then, by default, it propagates this tag to every function that uses it.
So, every function has then list of tagged functions that are used by it
And every function (whether automatically, by try/catch wrap detection, or manually) can stop further propagation of tag.
Such feature would also need support of code editor of course