Documentation for G4UImanager::GetLastReturnCode()

We have a simulation framework with executables and macro files which are submitted to batch. Is there any way to have the main program recognize and report on failures from the macro files? We run the macros with the usual

UImanager->ExecuteMacroFile(filename);

function call. But this function returns void, so there’s no way to know directly whether the macro succeeded or failed, other than parsing the log file after the fact.

What’s more, if the failure caused the Geant4 job to crash or abort, there isn’t even a non-zero return code :frowning: All jobs return 0 (“success”), even if they failed.

Would the function G4UImanager::GetLastReturnCode() be suitable for this? Is there any documentation available which explains what it returns? Is there a table or an enum of values with meanings?