X Tutup
Skip to content

Commit 6d34b93

Browse files
authored
Merge pull request microsoft#1595 from PissedCapslock/patch-1
[api-extractor] Clarified the error message
2 parents 88e8486 + 5403b64 commit 6d34b93

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

apps/api-extractor-model/src/mixins/ApiItemContainerMixin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ export function ApiItemContainerMixin<TBaseClass extends IApiItemConstructor>(ba
154154

155155
public addMember(member: ApiItem): void {
156156
if (this[_membersByContainerKey].has(member.containerKey)) {
157-
throw new Error('Another member has already been added with the same name and containerKey');
157+
throw new Error(`Another member has already been added with the same name (${member.displayName})` +
158+
` and containerKey (${member.containerKey})`);
158159
}
159160

160161
const existingParent: ApiItem | undefined = member.parent;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/api-extractor-model",
5+
"comment": "Clarified an error message",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@microsoft/api-extractor-model",
10+
"email": "robin.stevens@scz.be"
11+
}

0 commit comments

Comments
 (0)
X Tutup