Strip all the lines that don't begin with whitespace from stack traces. These are typically error messages, which may span many lines, rather than stack lines themselves.