Skip to content

Commit 0f695ed

Browse files
Clarified the error message
Clarified the error message by specifying which name and containerKey are already in use.
1 parent 4845cef commit 0f695ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ 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.name}) and containerKey (${member.containterKey})`);
158158
}
159159

160160
const existingParent: ApiItem | undefined = member.parent;

0 commit comments

Comments
 (0)