[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: abort or assert?

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-11-09 17:16:02 CET

On Tue, 2004-11-09 at 10:54, C. Michael Pilato wrote:
> I'm going to take the opportunity to learn something new, at the risk
> of demonstrating a hole in my C knowledge.
>
> What are the differences between these two approaches? You noted
> "possible data loss". How so?

asserts can be disabled with the NDEBUG define. aborts cannot. So, if
we're checking a condition and we know or strongly suspect that if (due
to a bug) it's false, we'll destroy data, perhaps an abort check is
warranted.

(But perhaps not.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 9 17:16:17 2004

This is an archived mail posted to the Subversion Dev mailing list.