convert exception to log message