-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
void ModelHighAPI_Interface::setName(const std::wstring& theName)
{
- if (feature().get())
+ if (feature().get() && feature()->data()->isValid())
feature()->data()->setName(theName);
+ else {
+ std::cout<<"Error: set name "<<theName.c_str()<<" for an invalid feature"<<std::endl;
+ }
}
std::wstring ModelHighAPI_Interface::name() const