]> Creatis software - clitk.git/blobdiff - common/clitkExceptionObject.h
add exception if error
[clitk.git] / common / clitkExceptionObject.h
index 02f9579963e785322885c4a1ddbef54f7fd2d24c..af5f421cac28f5462334758ebae3eaec2e62275b 100644 (file)
 #ifndef CLITKEXCEPTIONOBJECT_H
 #define CLITKEXCEPTIONOBJECT_H
 
+#include <sstream>
+
 // clitk
 #include "clitkCommon.h"
 
 // itk
-#include "itkExceptionObject.h"
+#include "itkMacro.h"
 
 namespace clitk {
 
@@ -46,7 +48,7 @@ namespace clitk {
   // itkObject
 #define clitkExceptionMacro(x)                                          \
   {                                                                     \
-    ::itk::OStringStream message;                                       \
+    std::ostringstream message;                                       \
     message << x;                                                       \
     ::clitk::ExceptionObject e_(__FILE__, __LINE__, message.str().c_str()); \
     throw e_; /* Explicit naming to work around Intel compiler bug.  */ \