Gets the stack trace as string.