2 ms·
Asserts are not an alternative to validating user input or input data in general (e.g. data loaded from files or received over the network). If wrong input tri
by flohofwoe 3y ago
Asserts are not an alternative to validating user input or input data in general (e.g. data loaded from files or received over the network).
If wrong input triggers an assert, that means that the input validation is incomplete (and in that case the assert may prevent further much worse damage, and also provide important information to the programmer who's going to fix that bug).
Basically, asserts should never trigger if the user "does something wrong".