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

Clarify parameters and add missing 'id' to the error message in viewRegistry.ts #35358

Merged
merged 1 commit into from Sep 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/vs/workbench/browser/parts/views/viewsRegistry.ts
Expand Up @@ -96,7 +96,7 @@ export const ViewsRegistry: IViewsRegistry = new class {
this._views.set(viewDescriptor.location, views);
}
if (views.some(v => v.id === viewDescriptor.id)) {
throw new Error(localize('duplicateId', "A view with {0} is already registered in the location ${1}", viewDescriptor.id, viewDescriptor.location.id));
throw new Error(localize('duplicateId', "A view with id `{0}` is already registered in the location `{1}`", viewDescriptor.id, viewDescriptor.location.id));
}
views.push(viewDescriptor);
}
Expand Down Expand Up @@ -145,4 +145,4 @@ export const ViewsRegistry: IViewsRegistry = new class {
this._views.forEach(views => registered = registered || views.some(view => view.id === id));
return registered;
}
};
};