Vladimir Prus wrote:
Peter Dimov wrote:
If the problem you are trying to fix is that assert() does not give enough information about the bug - and I haven't seen this particular problem reported as a defect
I interpreted Kevin's post this way -- Boost.Tread fails and does not produce any useful diagnostic.
The proper way to fix that is to make Boost.Threads not fail, right? That's what invariant/"assertion" asserts are for - to catch bugs. They aren't an error reporting mechanism.
- the proper way to fix it is to define an user-overrideable callback.
I think you're overgeneralising. If assert prints an error message and exits, then what's the problem with printing one extra diagnostic message before assert?
None (if you are sure that this is what assert does, of course - this is platform specific), except that the asserts should not fire. So spending time and effort to make something happen when the asserts fire is not productive.