diff --git a/tools/projmgr/src/ProjMgr.cpp b/tools/projmgr/src/ProjMgr.cpp index cc4ce7e90..4eb5ac46b 100644 --- a/tools/projmgr/src/ProjMgr.cpp +++ b/tools/projmgr/src/ProjMgr.cpp @@ -912,6 +912,10 @@ bool ProjMgr::RunListLayers(void) { // Step3: Detect layers and list them vector layers; error = !m_worker.ListLayers(layers, m_clayerSearchPath, m_failedContext); + if (error) { + ProjMgrLogger::Error("error occurred during layer detection. Please review the project and its dependencies"); + } + // If the worker has toolchain errors, set the error flag if (m_worker.HasToolchainErrors()) { error = true; diff --git a/tools/projmgr/test/src/ProjMgrUnitTests.cpp b/tools/projmgr/test/src/ProjMgrUnitTests.cpp index c8c58a4e8..4a237849c 100644 --- a/tools/projmgr/test/src/ProjMgrUnitTests.cpp +++ b/tools/projmgr/test/src/ProjMgrUnitTests.cpp @@ -1991,6 +1991,8 @@ connections are invalid\n\ \n\ no valid combination of clayers was found\n\ \n\ +error csolution: error occurred during layer detection. Please review the project and its dependencies\ +\n\ "; const string& errStr = streamRedirect.GetErrorString(); @@ -2121,7 +2123,8 @@ check combined connections:\ EXPECT_EQ(1, RunProjMgr(8, argv, m_envp)); errStr = streamRedirect.GetErrorString(); - EXPECT_TRUE(regex_match(errStr, regex(".*invalid/clayer/path - error csolution: clayer search path does not exist\n"))); + string expectedStr = ".*invalid/clayer/path - error csolution: clayer search path does not exist\nerror csolution: error occurred during layer detection. Please review the project and its dependencies\n"; + EXPECT_TRUE(regex_match(errStr, regex(expectedStr))); } TEST_F(ProjMgrUnitTests, LayerVariables) { @@ -2198,7 +2201,8 @@ no valid combination of clayers was found.*\ streamRedirect.ClearStringStreams(); expectedErrStr = ".*\ error csolution: undefined variables in variables-notdefined.csolution.yml:.*\ - - \\$NotDefined\\$"; + - \\$NotDefined\\$\ +error csolution: error occurred during layer detection. Please review the project and its dependencies"; argv[7] = (char*)"-q"; EXPECT_EQ(1, RunProjMgr(8, argv, m_envp));