Open Pooja3894 opened 2 years ago
Assertions are good but in general used enforce some invariants (eg. a condition that should never be reached if the code is properly used). Here this is more like a test so an exception looks, to me, more appropriate. From Maxime