Mir

Comment 11 for bug 1237332

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

We should write code that accepts "the way C++ is designed".

1. We should never allow exceptions to propagate out of the function passed to std::thread
2. If we encounter a "fatal" condition we should record enough context to debug it (and not just throw an exception in the blind hope of getting useful information later)

As I mentioned above, we can emulate Java and attach a stack trace to exceptions. But this has the cost of scanning the stack and debug info when the exception is thrown - and for normal exceptions that isn't needed (as they are caught and things go on as normal).

In any case, to extract the stack trace we'd likely need to catch the exception somewhere - and the failure to do that is the real problem underlying this bug report.