3 ms·
So because you can't think of an alternative, there should be no way of handling a scenario where, say, maybe that port is already in use? Again, the explicitn
by drivebyacct2 14y ago
So because you can't think of an alternative, there should be no way of handling a scenario where, say, maybe that port is already in use?
Again, the explicitness is by design. My "handle" code would be checking the failure and acting on it: trying another port, logging a message, sending an email telling me my server isn't starting.
I doubt the existence of a real world app that really fires up an HTTP server and blindly dies without so much as logging to indicate failure.
- masklinn 14y ago> So because you can't think of an alternative, there should be no way of handling a scenario And more strawmanning, great. Of course there is a way to handle failure: catch the bloody exception. Which is completely unlike what the original code does, hence your original comment being a (not very original) strawman.