I have very simple server
http.createServer(function(request, response) {
response.writeHead(200);
response.end("Hello world");
}).listen(8080);
What exceptions can it throw except listen EADDRINUSE?
Can it thow an error if user disconnects in the middle of request sending? Or something like this?
It will not throw exception in such scenario as disconnected client - is very 'normal' behaviour.
The EADDRINUSE exception is thrown at the moment of calling http.createServer, as it tries to create socket and will fail in case if port is already in use.
While events you are talking, is behind the scenes stuff, like client disconnects, or timeouts, or similar. Those events is happening asynchronously and that is why they can't be just thrown to node.js execution in middle of nowhere.
You still have events for request it self, and have to subscribe to them, here are good answer that covers what you need: node.js http server, detect when clients disconnect