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

More informative error messages for when we can't instantiate components #1246

Merged
merged 9 commits into from
Feb 29, 2020
Merged

More informative error messages for when we can't instantiate components #1246

merged 9 commits into from
Feb 29, 2020

Conversation

vladsud
Copy link
Contributor

@vladsud vladsud commented Feb 13, 2020

No description provided.

Copy link

@cosmincatrinescu cosmincatrinescu left a comment

Choose a reason for hiding this comment

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

Yes, this would help for running into undefined.

Copy link
Contributor

@skylerjokiel skylerjokiel left a comment

Choose a reason for hiding this comment

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

🧸

return this.componentRuntimeDeferred.promise;
}
factory = entry.IComponentFactory;
registry = entry.IComponentRegistry;
}

if (factory === undefined) {
throw new Error(`Can't find factory for ${lastPkg} package`);
Copy link
Contributor

Choose a reason for hiding this comment

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

we should follow the above pattern here:

 this.componentRuntimeDeferred.reject(`Registry does not contain an entry for the package ${pkg}`);
return this.componentRuntimeDeferred.promise;

otherwise there will be a dangling deferred promise

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.

5 participants