Skip to content

Commit

Permalink
Switches to use IVsActivityLog for error logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
zooba committed Jul 2, 2015
1 parent f873af2 commit 3f0fe78
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ sealed class InterpreterListToolWindow : ToolWindowPane {
}
}

private static void LogLoadException(IEnvironmentViewExtensionProvider provider, Exception ex) {
private void LogLoadException(IEnvironmentViewExtensionProvider provider, Exception ex) {
string message;
if (provider == null) {
message = SR.GetString(SR.ErrorLoadingEnvironmentViewExtensions, ex);
Expand All @@ -154,9 +154,13 @@ sealed class InterpreterListToolWindow : ToolWindowPane {
}

Debug.Fail(message);
try {
ActivityLog.LogError(SR.ProductName, message);
} catch (InvalidOperationException) {
var log = _site.GetService(typeof(SVsActivityLog)) as IVsActivityLog;
if (log != null) {
log.LogEntry(
(uint)__ACTIVITYLOG_ENTRYTYPE.ALE_ERROR,
SR.ProductName,
message
);
}
}

Expand Down

0 comments on commit 3f0fe78

Please sign in to comment.