]> Creatis software - clitk.git/blobdiff - common/clitkExceptionObject.cxx
*** empty log message ***
[clitk.git] / common / clitkExceptionObject.cxx
index 8adb8a01465d2005aed73a6988617211d757d3da..b76edf5582c51283380fca784eafea246e95afea 100644 (file)
@@ -37,7 +37,10 @@ const char* clitk::ExceptionObject::what() const throw()
   ::itk::OStringStream message;
   message << "clitk::ERROR in " << m_Filename << " line " << m_LineNumber
           << " : " << std::endl << "\t" << m_Message;
-  return message.str().c_str();
+  char * m = new char[message.str().length()];
+  for(uint i=0; i< message.str().length(); i++)
+    m[i] = message.str().c_str()[i];
+  return m;//essage.str().c_str();
 }
 //--------------------------------------------------------------------