Skip to content
Snippets Groups Projects
Commit a191fd08 authored by Andre Sailer's avatar Andre Sailer
Browse files

Geant4UIManager: check more ApplyCommands for failures

parent 3999a5b6
No related branches found
No related tags found
No related merge requests found
...@@ -210,7 +210,10 @@ void Geant4UIManager::start() { ...@@ -210,7 +210,10 @@ void Geant4UIManager::start() {
/// Execute the chained pre-run command statements /// Execute the chained pre-run command statements
for(const auto& c : m_preRunCommands) { for(const auto& c : m_preRunCommands) {
info("++ Executing pre-run statement: %s",c.c_str()); info("++ Executing pre-run statement: %s",c.c_str());
mgr->ApplyCommand(c.c_str()); G4int ret = mgr->ApplyCommand(c.c_str());
if ( ret != 0 ) {
except("Failed to execute command: %s",c.c_str());
}
executed_statements = true; executed_statements = true;
} }
/// Start UI session if present /// Start UI session if present
...@@ -219,7 +222,10 @@ void Geant4UIManager::start() { ...@@ -219,7 +222,10 @@ void Geant4UIManager::start() {
/// Execute the chained post-run command statements /// Execute the chained post-run command statements
for(const auto& c : m_postRunCommands) { for(const auto& c : m_postRunCommands) {
info("++ Executing post-run statement: %s",c.c_str()); info("++ Executing post-run statement: %s",c.c_str());
mgr->ApplyCommand(c.c_str()); G4int ret = mgr->ApplyCommand(c.c_str());
if ( ret != 0 ) {
except("Failed to execute command: %s",c.c_str());
}
executed_statements = true; executed_statements = true;
} }
return; return;
...@@ -232,7 +238,10 @@ void Geant4UIManager::start() { ...@@ -232,7 +238,10 @@ void Geant4UIManager::start() {
/// Execute the chained post-run command statements /// Execute the chained post-run command statements
for(const auto& c : m_postRunCommands) { for(const auto& c : m_postRunCommands) {
info("++ Executing post-run statement: %s",c.c_str()); info("++ Executing post-run statement: %s",c.c_str());
mgr->ApplyCommand(c.c_str()); G4int ret = mgr->ApplyCommand(c.c_str());
if ( ret != 0 ) {
except("Failed to execute command: %s",c.c_str());
}
} }
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment