How do I get the current stack trace in Java, like how in .NET you can do Environment.StackTrace
?
(我如何在Java中获取当前的堆栈跟踪 ,例如在.NET中如何执行Environment.StackTrace
?)
I found Thread.dumpStack()
but it is not what I want - I want to get the stack trace back, not print it out.
(我找到了Thread.dumpStack()
但这不是我想要的-我想获取堆栈跟踪,而不是打印出来。)
ask by ripper234 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…