>Farid Zaripov wrote: > >> Martin Sebor wrote: >> >[...] >> > I meant that it's not possible to know when we should >> abort and when >> > only print the message. >> >> How about aborting on errors and assertions (e.g., by calling >> rw_fatal()) and continuing on warnings (and calling rw_warn())? > > Maybe it's reasonable for the _CRT_ASSERT reports, but, for example, >the _CRT_ERROR report is issued from abort() function. I'm not sure if >we >can invoke rw_fatal() from abort() :-)
You should be able to, though it probably isn't a very good idea. It just does a longjmp back out of the test. I think there are a bigger questions that we should be asking ourselves. Is windows the only platform that provides a debug version of the C library? I don't know of any other platform that does, but I could be very wrong. If other platforms have a debug C library, do those C library implementations abort() [or assert()] internally when something is wrong. If they do, what is the behavior? Should we really be translating crt warnings/errors/assertions to test warnings/errors/assertions? I think the answer to this question is no. It seems that this makes windows even more different than any other platform. We don't attempt to report errors with rw_fatal() when the system calls abort() on any other platform I'm familiar with. Travis > >Farid. >
