diff --git a/Modules/Wrappers/ApplicationEngine/include/otbWrapperInputImageParameter.txx b/Modules/Wrappers/ApplicationEngine/include/otbWrapperInputImageParameter.txx
index b60be0d0230b40ad01653b60fbbbe753e411d282..f8aa185cedefc55657c3cbc98c2fa6abdf78f72b 100644
--- a/Modules/Wrappers/ApplicationEngine/include/otbWrapperInputImageParameter.txx
+++ b/Modules/Wrappers/ApplicationEngine/include/otbWrapperInputImageParameter.txx
@@ -178,7 +178,7 @@ template <class TInputImage, class TOutputImage>
 TOutputImage*
 InputImageParameter::CastImage()
 {
-  itkExceptionMacro("Cast from "<<typeid(TInputImage).name()<<" to "<<typeid(TInputImage).name()<<" not authorized.");
+  itkExceptionMacro("Cast from "<<typeid(TInputImage).name()<<" to "<<typeid(TOutputImage).name()<<" not authorized.");
 }