Gets the stack trace from the given throwable.