diff --git a/lib/resourceFactory.js b/lib/resourceFactory.js index 5422ba8c..2a7cb9b0 100644 --- a/lib/resourceFactory.js +++ b/lib/resourceFactory.js @@ -72,9 +72,11 @@ const resourceFactory = { log.warn(`resourceFactory.createCollectionsForTree called with deprecated parameter "useNamespaces". ` + `This parameter will be removed in @ui5/fs version 2.0. ` + `Use parameter "getVirtualBasePathPrefix" instead`); - if (getVirtualBasePathPrefix) { - throw new Error(`resourceFactory.createCollectionsForTree called with useNamespace and getVirtualBasePathPrefix`) - } + } + if (useNamespaces && getVirtualBasePathPrefix) { + throw new Error( + `resourceFactory.createCollectionsForTree called with parameters "useNamespace" and ` + + `"getVirtualBasePathPrefix". Please provide only one of the two.`); } function processDependencies(project) {