Description
This is a real life scenario: I am trying to fix an issue where the callback to less.render() throws, and as a result I get unhandled rejection. I went to the Less documentation site hoping that I would find info on how to pass a rejection callback to less.render()
. My hope was in vain. Do I have to ensure that the render()
callback doesn't let any exceptions out? Do I pass the rejection callback as 4th argument? Does less.render()
return a promise?
This should be documented somewhere, preferably in the 'Usage in code' section.
It is quite possible that less.render() does everything synchronously and the unhandled rejection happens entirely within my callback. Still, if arguments and return value were thoroughly documented, I would know this by now.