From 4ee97efc7c69816bcc116591a14aa7550b7da267 Mon Sep 17 00:00:00 2001 From: ageay Date: Mon, 13 Feb 2012 11:38:25 +0000 Subject: [PATCH] Suppression of Exception print on instanciation. --- src/INTERP_KERNEL/Bases/InterpKernelException.cxx | 3 --- src/MEDCoupling_Swig/MEDCoupling.i | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/INTERP_KERNEL/Bases/InterpKernelException.cxx b/src/INTERP_KERNEL/Bases/InterpKernelException.cxx index 6bb9285f5..8f5b22546 100644 --- a/src/INTERP_KERNEL/Bases/InterpKernelException.cxx +++ b/src/INTERP_KERNEL/Bases/InterpKernelException.cxx @@ -19,11 +19,8 @@ #include "InterpKernelException.hxx" -#include - INTERP_KERNEL::Exception::Exception(const char *reason):_reason(reason) { - std::cerr << "AN INTERP_KERNEL::EXCEPTION HAS BEEN THROWN : " << reason << "**********" << std::endl; } INTERP_KERNEL::Exception::Exception(const char *reason, const char *file, int line):_reason(reason) diff --git a/src/MEDCoupling_Swig/MEDCoupling.i b/src/MEDCoupling_Swig/MEDCoupling.i index 15a50a65f..2c0366dac 100644 --- a/src/MEDCoupling_Swig/MEDCoupling.i +++ b/src/MEDCoupling_Swig/MEDCoupling.i @@ -314,6 +314,13 @@ namespace INTERP_KERNEL Exception(const char* what); ~Exception() throw (); const char *what() const throw (); + %extend + { + std::string __str__() const + { + return std::string(self->what()); + } + } }; } -- 2.39.2