Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception handling for unit tests and more #2858

Merged
merged 5 commits into from Mar 14, 2017

Conversation

MDoerner
Copy link
Contributor

This and that:

  1. Slightly more safety for long procedure names in Excel. (If > 255 chars, drop the filename.)

  2. Catching and logging of COMExceptions thrown during running the unit tests. (Application.Run might not like what we are feeding it.) Exception gets logged and test gets set to Inconclusive - Unexpected COM error.

  3. Small refactoring of SyncCOMReferences in the ParseCoordinator. Now, the setup for parallelism gets only performed if there is actually soemthing to load.


var referenceLoadingTaskScheduler = ThrottelingTaskScheduler(_maxReferenceLoadingConcurrency);
State.OnStatusMessageUpdate(ParserState.LoadingReference.ToString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this get the localized resource for the ParserState.LoadingReference state? The InspectionUI resources will be moving to the Rubberduck.Parsing assembly; perhaps the ParserState enum resources should be moved to ParsingText.resx?

@@ -839,22 +839,12 @@ private void SyncComReferences(IReadOnlyList<IVBProject> projects, CancellationT
var unmapped = new ConcurrentBag<IReference>();

var referencesToLoad = GetReferencesToLoadAndSaveReferencePriority(projects);

State.OnStatusMessageUpdate(ParserState.LoadingReference.ToString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I just realized why that "Loading references" caption didn't follow the localization settings...

@@ -6,6 +6,8 @@ namespace Rubberduck.VBEditor.Application
{
public class ExcelApp : HostApplicationBase<Microsoft.Office.Interop.Excel.Application>
{
public const int MaxPossibleLengthOfProcedureName = 255;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to have that one in HostApplicationBase, no?

@retailcoder retailcoder merged commit 4c5de3d into rubberduck-vba:next Mar 14, 2017
@MDoerner MDoerner deleted the stuff branch July 2, 2017 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants