For readability, can you extract these next 6 lines into a private helper method getStackTrace(Thread)?