diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx index eaefbd445e0ed24d4e6d64ff99010fe07d30bca6..3a928084ad42d6f0c4bd320edb26626429c73dcb 100644 --- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx +++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx @@ -107,7 +107,7 @@ CommandLineLauncher::Load() if( this->LoadPath() == false ) { - std::cerr << "ERROR: At least one specifed path within \""<< m_Parser->GetAttributAsString(m_Parser->GetModulePathKey(), m_Expression)<<"\" is invalid..." <<std::endl; + std::cerr << "ERROR: At least one specifed path within \""<< m_Parser->GetAttributAsString(m_Parser->GetModulePathKey(), m_Expression)<<"\" is invalid or doesn't exist..." <<std::endl; return false; } @@ -239,7 +239,6 @@ CommandLineLauncher::LoadPath() { for( unsigned i=0; i<pathList.size(); i++) { - std::cout<<pathList[i]<<std::endl; ApplicationRegistry::AddApplicationPath(pathList[i]); } } @@ -281,7 +280,7 @@ CommandLineLauncher::LoadApplication() std::cerr << "ERROR: Available modules :" << std::endl; for (std::vector<std::string>::const_iterator it = list.begin(); it != list.end(); ++it) { - std::cout << "\t" << *it << std::endl; + std::cerr << "\t" << *it << std::endl; } return; } diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.cxx index fc3a57f325bd4dc5850b120a9fffe0cb89343b21..f796120ad1c22ca746576e0ad547aa3a9b05a712 100644 --- a/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.cxx +++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.cxx @@ -157,15 +157,16 @@ CommandLineParser::GetModuleName( std::string & modName, const std::string & exp std::vector<std::string> CommandLineParser::GetAttribut( const std::string & key, const std::string & exp ) { + std::vector<std::string> res; + std::string keySpaced = key; keySpaced.append(" "); std::size_t found = std::string(exp).find(keySpaced); if( found == std::string::npos ) { - itkExceptionMacro("No key \""<<key<<"\" found in \""<<exp<<"\"."); + return res; } - std::vector<std::string> res; std::string expFromKey = std::string(exp).substr(found+key.size(), std::string(exp).size()); if( expFromKey.size() == 0 )