private void HandleException(Exception ex)
{
if (ex == null || string.IsNullOrWhiteSpace(ex.Message))
{
return;
}
writeToLog(string.Format(CultureInfo.CurrentCulture, ExceptionFormat, ex.Message));
if (ex.InnerException != null && !string.IsNullOrWhiteSpace(ex.InnerException.Message))
{
writeToLog(string.Format(CultureInfo.CurrentCulture, InnerExceptionFormat, ex.InnerException.Message));
}
}