Skip to content

Commit

Permalink
updating LogError for #332
Browse files Browse the repository at this point in the history
  • Loading branch information
sayedihashimi committed Jan 2, 2016
1 parent 6a1f653 commit 062cadd
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions LigerShark.Templates/GoogleAnalyticsWizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,18 @@ public string GetHashString(string text)
}

private void LogError(string message)
{
IVsActivityLog _log = GetService(typeof(SVsActivityLog)) as IVsActivityLog;
{
try {
IVsActivityLog _log = GetService(typeof(SVsActivityLog)) as IVsActivityLog;

_log.LogEntry(
(UInt32)__ACTIVITYLOG_ENTRYTYPE.ALE_ERROR,
this.ToString(),
string.Format(CultureInfo.CurrentCulture, "{0}", message));
_log.LogEntry(
(UInt32)__ACTIVITYLOG_ENTRYTYPE.ALE_ERROR,
this.ToString(),
string.Format(CultureInfo.CurrentCulture, "{0}", message));
}
catch (Exception) {
// there was likely an error getting the activity service, ignore it so it won't throw
}
}
}
}

0 comments on commit 062cadd

Please sign in to comment.