Import Geant4 10.4.1 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 106172 2017-09-15 13:03:57Z gcosmo $
|
||||
$Id: History 108488 2018-02-15 14:52:00Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,15 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
20 December, 2017 Makoto Asai (intercoms-V10-03-05)
|
||||
- G4UIcommand, G4UImanager: additional implementation for adding
|
||||
a mechanism of carrying back error message from the messenger
|
||||
if a command is rejected due to the target class or the messenger.
|
||||
|
||||
18 December, 2017 Makoto Asai
|
||||
- G4UIcommand: added a mechanism of carrying error message from
|
||||
the messenger.
|
||||
|
||||
15 September, 2017 Gabriele Cosmo (intercoms-V10-03-04)
|
||||
- More cases of static symbols to export for DLLs.
|
||||
- Removed inline specification for two static methods in G4UImanager.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UIcommand.hh 77563 2013-11-26 09:03:18Z gcosmo $
|
||||
// $Id: G4UIcommand.hh 108488 2018-02-15 14:52:00Z gcosmo $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -194,6 +194,22 @@ class G4UIcommand
|
||||
inline G4bool IsWorkerThreadOnly() const
|
||||
{ return workerThreadOnly; }
|
||||
|
||||
protected:
|
||||
G4int commandFailureCode;
|
||||
G4String failureDescription;
|
||||
|
||||
public:
|
||||
inline void CommandFailed( G4int errCode, G4ExceptionDescription& ed )
|
||||
{ commandFailureCode = errCode; failureDescription = ed.str(); }
|
||||
inline void CommandFailed( G4ExceptionDescription& ed )
|
||||
{ commandFailureCode = 1; failureDescription = ed.str(); }
|
||||
inline G4int IfCommandFailed()
|
||||
{ return commandFailureCode; }
|
||||
inline G4String& GetFailureDescription()
|
||||
{ return failureDescription; }
|
||||
inline void ResetFailure()
|
||||
{ commandFailureCode = 0; failureDescription = ""; }
|
||||
|
||||
protected:
|
||||
G4int CheckNewValue(const char* newValue);
|
||||
|
||||
|
||||
@@ -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