#ifndef _UTILS_CORBAEXCEPTION_HXX_
#define _UTILS_CORBAEXCEPTION_HXX_
+#include <SALOME_Utils.hxx>
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Exception)
throw SALOME::SALOME_Exception(ExDescription); \
}
+#include <ostream>
+
+//Dump the CORBA exception type.
+inline std::ostream& operator<<(std::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