Message: Get result of macro execution Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Get result of macro execution 

Forum: Run Management
Date: 04 Apr, 2018
From: Nicola Mori <Nicola Mori>

In my application I need to process a macro and check whether the execution was successful or not. Currently, I'm aware of two ways of processing a macro file:

  G4UImanager::GetUIpointer()->ApplyCommand(G4String("/control/execute " + macroFile));

and:

  G4UImanager::GetUIpointer()->ExecuteMacroFile(macroFile);
  
But the first method returns 0 (i.e. success) also when the processing fails (e.g. because of a non-existing command in the macro) and the second one has no return value. If I'm correct, both don't throw exceptions.
Is there another way or really the API does not allow the check?
Thanks.

 Add Message Add Message
to: "Get result of macro execution"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]