Skip to content

Commit 6f8ed99

Browse files
committed
swallowed ObjectDisposedException in RubberduckParser; fixed FormatException in RubberduckParserState.
1 parent 6ba11a6 commit 6f8ed99

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Rubberduck.Parsing/VBA/RubberduckParser.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,12 @@ public void Dispose()
667667

668668
if (_cancellationTokens[0] != null)
669669
{
670-
_cancellationTokens[0].Cancel();
671-
_cancellationTokens[0].Dispose();
670+
try
671+
{
672+
_cancellationTokens[0].Cancel();
673+
_cancellationTokens[0].Dispose();
674+
}
675+
catch (ObjectDisposedException) { /* todo: avoid this being thrown in the first place */ }
672676
}
673677
}
674678
}

Rubberduck.Parsing/VBA/RubberduckParserState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private void Sinks_ProjectRenamed(object sender, IProjectRenamedEventArgs e)
119119
return;
120120
}
121121

122-
Logger.Debug("Project {1} renamed.", e.ProjectId);
122+
Logger.Debug("Project {0} was renamed.", e.ProjectId);
123123

124124
RemoveProject(e.ProjectId);
125125
AddProject(e.ProjectId);

0 commit comments

Comments
 (0)