Alex Rivera | Logout

Are assertions always bad?

Asked 2009-01-07T06:37:20.183
20

I used to work for a company where some of the lead architect/developers had mandated on various projects that assertions were not to be used, and they would routinely be removed from code and replaced with exceptions.

I feel they are extremely important in writing correct code. Can anyone suggest how such a mandate could be justified? If so, what's wrong with assertions?

Edit
Report

1 Answer

0

Note, throwing an exception in a destructor is undefined behaviour.

answered 2009-02-26T14:12:00.070

Your Answer