diff --git a/Code/Common/otbParser.cxx b/Code/Common/otbParser.cxx
index 125168d880e9c4961838159490fa7e81f6d3c788..1c5cffa60c35a9b0f7aca6cf53edd40d5e9fb115 100644
--- a/Code/Common/otbParser.cxx
+++ b/Code/Common/otbParser.cxx
@@ -18,6 +18,7 @@
 #include "otbMath.h"
 #include "itkMacro.h"
 #include "otbParser.h"
+#include "otbMacro.h"
 
 namespace otb
 {
@@ -114,7 +115,7 @@ bool Parser::CheckExpr()
   }
  catch(ParserType::ExceptionType &e)
   {
-   ExceptionHandler(e);
+   ExceptionHandlerDebug(e);
    return false;
   }
 
@@ -140,6 +141,20 @@ void Parser::ExceptionHandler(ParserType::ExceptionType &e)
 }
 
 
+void Parser::ExceptionHandlerDebug(ParserType::ExceptionType &e)
+{
+  otbGenericMsgDebugMacro(                                     << std::endl
+        << "Message:     "   << e.GetMsg()   << std::endl
+        << "Formula:     "   << e.GetExpr()  << std::endl
+        << "Token:       "   << e.GetToken() << std::endl
+        << "Position:    "   << e.GetPos()   << std::endl
+               << std::endl);
+//        << "Errc:        "   << e.GetCode()  << std::endl);
+}
+
+
+
+
 // Get the map with the variables
 const std::map<std::string, Parser::ValueType*>& Parser::GetVar() const
 {
diff --git a/Code/Common/otbParser.h b/Code/Common/otbParser.h
index 640b1c8f05fd1a36ee4adf32f1be05dae36b9886..da34bffbf04d9e6d2b4b395283df3f60d9a6e806 100644
--- a/Code/Common/otbParser.h
+++ b/Code/Common/otbParser.h
@@ -83,7 +83,8 @@ public:
 
   /** Convert parser specific exception into itk exception */
   virtual void ExceptionHandler(ExceptionType &e);
-
+  /** Convert parser specific exception into itk debug macro */
+   virtual void ExceptionHandlerDebug(ExceptionType &e);
   
 protected:
   Parser();