I've a restify server that get requests from a client with some parameters to run a long process.
so, after initializing some attributes and some checks, the service returns a json to the client (and start processing asynchronusly). then the client can monitor the process via log files on sockets.
The problem is any exception before
res.send(jsonObject)
can be caught by
process.on('uncaughtException'...
but any exception after sending the response can't be caught!!!
regardless that handling exceptions this way isn't the best way and tailing on sockets isn't so good
I want to be able to catch the later exceptions that may occur after sending response to the client!!