I recently asked whether to report the getMessage()
text of a caught exception. Rather surprisingly, most answers misunderstood my question and thought I was asking whether to report the stack-trace for a caught exception, suggesting that doing so is considered the norm. So I'm asking a follow up question.
In which circumstances should you, or should you not, report a stack-trace when you catch
an exception? By "reporting" I include asking a logging framework to log the stack-trace for you.
I am not asking whether to report something. I'm asking whether that report should include the stack-trace.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…