convert exception to string so it can be appended to the log