Salome HOME
DCQ : Merge with Ecole_ete_a6.
[modules/kernel.git] / src / Utils / Utils_CorbaException.hxx
index 8bffa2d18f4fdbbf3914c68530d8b68757d53476..d785f16d103250a0c33228c917b93dcceeff5136 100644 (file)
                 throw SALOME::SALOME_Exception(ExDescription); \
               }
 
+#include <ostream.h>
+//Dump the CORBA exception type.
+static ostream& operator<<(ostream& os, const CORBA::Exception& e)
+{
+  CORBA::Any tmp;
+  tmp<<= e;
+  CORBA::TypeCode_var tc = tmp.type();
+  const char *p = tc->name();
+  os<<"CORBA Exception was catch of the kind : ";
+  if ( *p != '\0' ) {
+    os<<p;
+  } 
+  else  { 
+    os << tc->id();
+  }
+  
+  return os;
+}
 #endif