X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOMESDS%2FSALOMESDS_Exception.cxx;h=1ae176591768a01ac421db1b0103cf13ddab84ad;hb=39b7aec84a009a8a1946ea7b8e50c066f1cfa1f3;hp=96c6cf50632e37e68c464efd1fbc67fd2c78c474;hpb=e429ce02076e083051c6520e0d7113022bd67b18;p=modules%2Fkernel.git diff --git a/src/SALOMESDS/SALOMESDS_Exception.cxx b/src/SALOMESDS/SALOMESDS_Exception.cxx index 96c6cf506..1ae176591 100644 --- a/src/SALOMESDS/SALOMESDS_Exception.cxx +++ b/src/SALOMESDS/SALOMESDS_Exception.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -21,12 +21,20 @@ #include "SALOMESDS_Exception.hxx" SALOMESDS::Exception::Exception(const std::string& reason) +{ + this->assign(reason.c_str()); +} + +SALOMESDS::Exception::Exception(const char *reason) +{ + this->assign(reason); +} + +void SALOMESDS::Exception::assign(const char *reason) { SALOME::ExceptionStruct es; es.type=SALOME::INTERNAL_ERROR; - es.text=CORBA::string_dup(reason.c_str()); + es.text=CORBA::string_dup(reason); es.lineNumber=0; (*this).details=es; } - -