3 ms·
Explain the Java services that only ever return an HTTP 200 and either return the proper XML response or a java stack trace formatted into HTML. And my point i
by lanstin 6y ago
Explain the Java services that only ever return an HTTP 200 and either return the proper XML response or a java stack trace formatted into HTML.
And my point is those if statement are wanted by the people that write high reliability software in C. There just isn’t a substitute for thinking about errors. Even well done exception throwing systems will specific “this layer can throw, this middle layer won’t worry about errors, then this higher layer will restart or retry or whatever”. And in go within one layer you can usually have all those steps in one function and for error cases with the same handling just check for if err != nil. When I read code without explicit error handling I worry. I guess this debate is probably an aesthetic debate, and different type of code have different urgency. The extra check for error return is like the check for parameter correctness at the top of a function, which is common in robust C code. You can’t trust the callers too much and better to log an error than terminate the process.
- apta 6y ago> And my point is those if statement are wanted by the people that write high reliability software in C. Because that's basically the only way of handling errors in C. That kind of software is written despite C's poor error handling, not because of it, and frankly, C is not the best example in writing high reliability software. Undefined behavior is a huge issue with it.