X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkExceptionObject.cxx;h=2b25696ba4c4f0fc810912bb8c07c09928b6b91b;hb=24fb0576a860ea843722b1d84561186542b62fd5;hp=8adb8a01465d2005aed73a6988617211d757d3da;hpb=cb9d2e28489c3531d37c241fe7d8a468451c8e67;p=clitk.git diff --git a/common/clitkExceptionObject.cxx b/common/clitkExceptionObject.cxx index 8adb8a0..2b25696 100644 --- a/common/clitkExceptionObject.cxx +++ b/common/clitkExceptionObject.cxx @@ -34,10 +34,12 @@ ExceptionObject(const char *file, unsigned int lineNumber, const char *desc): //-------------------------------------------------------------------- const char* clitk::ExceptionObject::what() const throw() { - ::itk::OStringStream message; + std::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()]; + strcpy(m, message.str().c_str()); + return m; } //--------------------------------------------------------------------