4 ms·
That’s the point of exceptions. They bubble up! I can manage them at a place where it is appropriate. Something had happened during the processing of this web
by kaba0 5y ago
That’s the point of exceptions. They bubble up! I can manage them at a place where it is appropriate.
Something had happened during the processing of this web request? Catch the exception and convert it to an appropriate status code.
You should only ever let exceptions fall through ”main” when the problem is really not something you can manage to handle.
- grey-area 5y agoThat's the theory. In practice often people let the exception eater in main handle it, and it either logs somewhere nobody looks or returns this sort of generic error and exits: https://www.google.com/search?q=Microsoft+Word+has+encountered+a+problem+and+needs+to+close https://www.google.com/search?q=Microsoft+Word+has+encounter...