X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fgenericgui%2FGuiExecutor.cxx;h=4bd977c69451a22148d5ac76b68957558d519ee6;hb=f31c1aa1cf3481bf51166f0c4e3dd118bc3ab43b;hp=c6f35d50c736dad020a11fc2d549b13c647bd9f5;hpb=14ddeddd588b20887c99de78c95d402527062012;p=modules%2Fyacs.git diff --git a/src/genericgui/GuiExecutor.cxx b/src/genericgui/GuiExecutor.cxx index c6f35d50c..4bd977c69 100644 --- a/src/genericgui/GuiExecutor.cxx +++ b/src/genericgui/GuiExecutor.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2014 CEA/DEN, EDF R&D +// Copyright (C) 2006-2015 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 @@ -279,8 +279,12 @@ void GuiExecutor::saveState(const std::string& xmlFile) bool StartFinish = (getExecutorState() == YACS::NOTYETINITIALIZED || getExecutorState() == YACS::FINISHED); if ( _isRunning || - !(CORBA::is_nil(_procRef)) && StartFinish ) - _procRef->saveState(xmlFile.c_str()); + !(CORBA::is_nil(_procRef)) && StartFinish ) { + if ( !_procRef->saveState(xmlFile.c_str()) ) { + string what = "Impossible to open file for writing: " + xmlFile; + throw Exception(what); + } + } } void GuiExecutor::setLoadStateFile(std::string xmlFile)