From: barate Date: Tue, 18 Dec 2012 12:24:09 +0000 (+0000) Subject: Remove duplicate function in SALOME_KernelServices.hxx X-Git-Tag: B4NGCMakeInt~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=39eb7e4a87437a996137738a362ec9099bb77b03;p=modules%2Fkernel.git Remove duplicate function in SALOME_KernelServices.hxx --- diff --git a/src/KernelHelpers/SALOME_KernelServices.hxx b/src/KernelHelpers/SALOME_KernelServices.hxx index 4970858cf..572e818d0 100644 --- a/src/KernelHelpers/SALOME_KernelServices.hxx +++ b/src/KernelHelpers/SALOME_KernelServices.hxx @@ -96,23 +96,8 @@ namespace KERNEL { #define SALOMELOG(msg) {MESS_BEGIN("[XSALOME]") << msg << MESS_END} #define LOG SALOMELOG -// This can help to LOG (or use in stream) the CORBA exceptions +#include "Utils_CorbaException.hxx" +// Tip: CORBA exceptions can be used with LOG (or more generally in streams) // Ex: LOG("An exception occurs: "< -#include -static 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 (); - if (*p != '\0') - os << p; - else - os << tc->id(); - return os; -} - #endif // KERNEL_SERVICES diff --git a/src/Utils/Utils_CorbaException.hxx b/src/Utils/Utils_CorbaException.hxx index aad2bb573..7239e8cde 100644 --- a/src/Utils/Utils_CorbaException.hxx +++ b/src/Utils/Utils_CorbaException.hxx @@ -56,7 +56,7 @@ inline std::ostream& operator<<(std::ostream& os, const CORBA::Exception& e) tmp<<= e; CORBA::TypeCode_var tc = tmp.type(); const char *p = tc->name(); - os<<"CORBA Exception was catch of the kind : "; + os << "CORBA Exception of type: "; if ( *p != '\0' ) { os<