diff --git a/Applications/FeatureExtraction/otbHaralickTextureExtraction.cxx b/Applications/FeatureExtraction/otbHaralickTextureExtraction.cxx index 32b3863cd33b6ba6c5a3f004096e954d4d34948e..9d6148fe6e6922a7236bfd598fbb0a7790ec4c28 100644 --- a/Applications/FeatureExtraction/otbHaralickTextureExtraction.cxx +++ b/Applications/FeatureExtraction/otbHaralickTextureExtraction.cxx @@ -166,8 +166,7 @@ void DoExecute() if( GetParameterInt("channel") > nBComp ) { - otbAppLogCRITICAL("Selected band is not available..."); - return; + itkExceptionMacro(<< "The specified channel index is invalid."); } const std::string texType = GetParameterString("texture"); diff --git a/Applications/FeatureExtraction/otbRadiometricIndices.cxx b/Applications/FeatureExtraction/otbRadiometricIndices.cxx index a0b1f209f9f30331137ad97b9514a78a9619bf5b..008b4536920ca70759cacfa487086cc8790b4a34 100644 --- a/Applications/FeatureExtraction/otbRadiometricIndices.cxx +++ b/Applications/FeatureExtraction/otbRadiometricIndices.cxx @@ -568,7 +568,7 @@ private: if( m_ImageList->Size() == 0 ) { - otbAppLogCRITICAL("No indices selected..."); + itkExceptionMacro(<< "No indices selected..."); } m_Concatener->SetInput( m_ImageList ); @@ -578,7 +578,7 @@ private: } else { - otbAppLogINFO("Wrong Band Number..."); + itkExceptionMacro(<< "At least one needed channel has an invalid index"); } } diff --git a/Applications/FeatureExtraction/otbSFSTextureExtraction.cxx b/Applications/FeatureExtraction/otbSFSTextureExtraction.cxx index b8d800372b52217c9491ee0761a6c9d9fc60b14c..f987119dfc2fb1333a5b759ae80cecf1bbbd22ad 100644 --- a/Applications/FeatureExtraction/otbSFSTextureExtraction.cxx +++ b/Applications/FeatureExtraction/otbSFSTextureExtraction.cxx @@ -130,8 +130,7 @@ void DoExecute() if( GetParameterInt("channel") > nBComp ) { - otbAppLogCRITICAL("Selected band is not available..."); - return; + itkExceptionMacro(<< "The specified channel index is invalid."); } m_ExtractorFilter = ExtractorFilterType::New();