Unlike simply calling exit, a call on assert will be least product some indication that an error has occurred. Drawbacks are that, like exit, it halts execution with no way or recovery, and the assert mechanism can be turned off by the programmer.