Open Arthurmtro opened 1 year ago
This will probably require a pretty significant reworking of the code since async functions require their calling functions to also be async which causes almost every function to end up being async (Except the top-level functions). I definitely understand the value of it though because a lot of the issues I run into is async functions failing. They don't seem to throw exceptions normally from what I've seen. Instead, the code just fails silently. Will that cause those exceptions to be caught reliably?
Yeah using catch will get rid of the crashs as you will handle them. Plus you will understand better how to clean your code base
ex:
https://github.com/nelak2/nwscript-sinfar-language-server/blob/c5afa5430fef7296ccdbac865df96269efc1e7b9/server/src/Documents/Document.ts#L43-L70