Import Geant4 10.4.1 source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIcommand.cc 102561 2017-02-09 08:16:05Z gcosmo $
|
||||
// $Id: G4UIcommand.cc 108488 2018-02-15 14:52:00Z gcosmo $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -41,14 +41,16 @@
|
||||
|
||||
G4UIcommand::G4UIcommand()
|
||||
: messenger(0), toBeBroadcasted(false), toBeFlushed(false), workerThreadOnly(false),
|
||||
bp(0), token(IDENTIFIER), paramERR(0)
|
||||
commandFailureCode(0), failureDescription(""),
|
||||
bp(0), token(IDENTIFIER),paramERR(0)
|
||||
{
|
||||
}
|
||||
|
||||
G4UIcommand::G4UIcommand(const char * theCommandPath,
|
||||
G4UImessenger * theMessenger, G4bool tBB)
|
||||
:messenger(theMessenger),toBeBroadcasted(tBB),toBeFlushed(false), workerThreadOnly(false),
|
||||
token(IDENTIFIER),paramERR(0)
|
||||
commandFailureCode(0), failureDescription(""),
|
||||
bp(0), token(IDENTIFIER),paramERR(0)
|
||||
{
|
||||
G4String comStr = theCommandPath;
|
||||
if(!theMessenger)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UImanager.cc 106172 2017-09-15 13:03:57Z gcosmo $
|
||||
// $Id: G4UImanager.cc 108488 2018-02-15 14:52:00Z gcosmo $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
@@ -526,7 +526,22 @@ G4int G4UImanager::ApplyCommand(const char * aCmd)
|
||||
{ histVec.erase(histVec.begin()); }
|
||||
histVec.push_back(aCommand);
|
||||
|
||||
return targetCommand->DoIt( commandParameter );
|
||||
targetCommand->ResetFailure();
|
||||
G4int commandFailureCode = targetCommand->DoIt( commandParameter );
|
||||
if(commandFailureCode==0)
|
||||
{
|
||||
G4int additionalFailureCode = targetCommand->IfCommandFailed();
|
||||
if(additionalFailureCode > 0)
|
||||
{
|
||||
G4ExceptionDescription msg;
|
||||
msg << targetCommand->GetFailureDescription() << "\n"
|
||||
<< "Error code : " << additionalFailureCode;
|
||||
G4Exception("G4UImanager::ApplyCommand","UIMAN0123",
|
||||
JustWarning,msg);
|
||||
commandFailureCode += additionalFailureCode;
|
||||
}
|
||||
}
|
||||
return commandFailureCode;
|
||||
}
|
||||
|
||||
void G4UImanager::StoreHistory(const char* fileName)
|
||||
|
||||
Reference in New Issue
Block a user