4 ms·
I don't think assert got used correctly if it needs a meaningful error message, personally. When an invariant of my algorithm fails, I've generally found I have
by theonemind 8y ago
I don't think assert got used correctly if it needs a meaningful error message, personally. When an invariant of my algorithm fails, I've generally found I have a fundamental logical error with no particular relationship to the point in the code where it fails.