The proper use of assertions is to inform developers about unrecoverable errors in a program. Assertions are not intended to signal expected error conditions. Assertions are meant to be internal self-checks for your program.
2022-12-03