4 ms·
Bit what assertAndContinue and not just assert in the second line? What value is there in continuing in that case?
by wvenable 8y ago
Bit what assertAndContinue and not just assert in the second line? What value is there in continuing in that case?
- aaaaaaaaaab 8y agoSo that managers can show pretty charts on board meetings about low crash numbers.
- wvenable 8y agoJust add a top-level exception handler that captures and logs everything but then restarts main() and never crash again! :)
- reggieband 8y agoIn some cases there are suspicious values that aren't necessarily incorrect. The person writing the code might think: "I don't expect this value but it won't cause an exception in the way a null reference will". You may want to catch these in development and if they show up, you investigate and there is no actual problem with the value then you can update the assertion to more accurately reflect the data.