-// 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
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)