[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
certi RTIA/FederationManagement.cc RTIA/RTIA.hh...
From: |
certi-cvs |
Subject: |
certi RTIA/FederationManagement.cc RTIA/RTIA.hh... |
Date: |
Thu, 15 Nov 2007 14:37:41 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: ROUSSELOT <rousse> 07/11/15 14:37:41
Modified files:
RTIA : FederationManagement.cc RTIA.hh
RTIA_federate.cc
RTIG : FederationsList.cc RTIG_processing.cc
Log message:
Better return of reason exception on failed create federation execution
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/FederationManagement.cc?cvsroot=certi&r1=3.33&r2=3.34
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA.hh?cvsroot=certi&r1=3.8&r2=3.9
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.49&r2=3.50
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/FederationsList.cc?cvsroot=certi&r1=3.43&r2=3.44
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&r1=3.42&r2=3.43
Patches:
Index: RTIA/FederationManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/FederationManagement.cc,v
retrieving revision 3.33
retrieving revision 3.34
diff -u -b -r3.33 -r3.34
--- RTIA/FederationManagement.cc 13 Nov 2007 13:25:39 -0000 3.33
+++ RTIA/FederationManagement.cc 15 Nov 2007 14:37:41 -0000 3.34
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: FederationManagement.cc,v 3.33 2007/11/13 13:25:39 rousse Exp $
+// $Id: FederationManagement.cc,v 3.34 2007/11/15 14:37:41 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -118,7 +118,8 @@
if (_est_createur_federation || _est_membre_federation)
e = e_RTIinternalError ;
- if (e == e_NO_EXCEPTION) {
+ if (e == e_NO_EXCEPTION)
+ {
requete.type = NetworkMessage::CREATE_FEDERATION_EXECUTION ;
strcpy(requete.federationName, theName);
strcpy(requete.FEDid, _FEDid) ;
@@ -130,7 +131,8 @@
comm->waitMessage(&reponse,
NetworkMessage::CREATE_FEDERATION_EXECUTION,
federate);
- if (reponse.exception == e_NO_EXCEPTION) {
+ if (reponse.exception == e_NO_EXCEPTION)
+ {
strcpy(_nom_federation, theName);
_numero_federation = reponse.federation ;
_est_createur_federation = true ;
@@ -140,12 +142,19 @@
// RTIG encounters a problem creating federation execution
{
e = reponse.exception;
- cout << "Could not open FED." << endl;
G.Out(pdGendoc,"exit FederationManagement::"
"createFederationExecution on exception");
throw CouldNotOpenFED (reponse.exceptionReason) ;
}
- else {
+ else if (reponse.exception == e_FederationExecutionAlreadyExists)
+ {
+ e = reponse.exception;
+ G.Out(pdGendoc,"exit FederationManagement::"
+ "createFederationExecution on exception");
+ throw FederationExecutionAlreadyExists (reponse.exceptionReason) ;
+ }
+ else
+ {
e = reponse.exception ;
D.Out(pdInit, "deja cree");
}
@@ -917,4 +926,4 @@
}} // namespace certi/rtia
-// $Id: FederationManagement.cc,v 3.33 2007/11/13 13:25:39 rousse Exp $
+// $Id: FederationManagement.cc,v 3.34 2007/11/15 14:37:41 rousse Exp $
Index: RTIA/RTIA.hh
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA.hh,v
retrieving revision 3.8
retrieving revision 3.9
diff -u -b -r3.8 -r3.9
--- RTIA/RTIA.hh 22 Mar 2007 14:18:00 -0000 3.8
+++ RTIA/RTIA.hh 15 Nov 2007 14:37:41 -0000 3.9
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: RTIA.hh,v 3.8 2007/03/22 14:18:00 rousse Exp $
+// $Id: RTIA.hh,v 3.9 2007/11/15 14:37:41 rousse Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_RTIA_HH
@@ -65,11 +65,11 @@
void processNetworkMessage(NetworkMessage *);
void processFederateRequest(Message *);
void chooseFederateProcessing(Message *, Message &, TypeException &)
- throw (CouldNotOpenFED);
+ throw (CouldNotOpenFED,FederationExecutionAlreadyExists);
};
}} // namespace certi
#endif // _CERTI_RTIA_HH
-// $Id: RTIA.hh,v 3.8 2007/03/22 14:18:00 rousse Exp $
+// $Id: RTIA.hh,v 3.9 2007/11/15 14:37:41 rousse Exp $
Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.49
retrieving revision 3.50
diff -u -b -r3.49 -r3.50
--- RTIA/RTIA_federate.cc 13 Nov 2007 13:25:39 -0000 3.49
+++ RTIA/RTIA_federate.cc 15 Nov 2007 14:37:41 -0000 3.50
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: RTIA_federate.cc,v 3.49 2007/11/13 13:25:39 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.50 2007/11/15 14:37:41 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -89,7 +89,7 @@
//! Choose federate processing.
void
RTIA::chooseFederateProcessing(Message *req, Message &rep, TypeException &e)
- throw (CouldNotOpenFED)
+ throw (CouldNotOpenFED,FederationExecutionAlreadyExists)
{
G.Out(pdGendoc,"enter RTIA::chooseFederateProcessing");
@@ -1015,7 +1015,7 @@
}
catch (FederationExecutionAlreadyExists &e) {
D.Out(pdExcept, "Catched %s Exception.", e._name);
- rep.setException(e_FederationExecutionAlreadyExists);
+ rep.setException(e_FederationExecutionAlreadyExists,e._reason);
}
catch (FederationExecutionDoesNotExist &e) {
D.Out(pdExcept, "Catched %s Exception.", e._name);
@@ -1221,4 +1221,4 @@
}} // namespace certi/rtia
-// $Id: RTIA_federate.cc,v 3.49 2007/11/13 13:25:39 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.50 2007/11/15 14:37:41 rousse Exp $
Index: RTIG/FederationsList.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/FederationsList.cc,v
retrieving revision 3.43
retrieving revision 3.44
diff -u -b -r3.43 -r3.44
--- RTIG/FederationsList.cc 13 Nov 2007 13:25:40 -0000 3.43
+++ RTIG/FederationsList.cc 15 Nov 2007 14:37:41 -0000 3.44
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: FederationsList.cc,v 3.43 2007/11/13 13:25:40 rousse Exp $
+// $Id: FederationsList.cc,v 3.44 2007/11/15 14:37:41 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -178,7 +178,8 @@
try {
exists(name, unused);
D.Out(pdExcept, "Federation %s already present.", name);
- throw FederationExecutionAlreadyExists("");
+ G.Out(pdGendoc,"exit FederationsList::createFederation on exception");
+ throw FederationExecutionAlreadyExists(name);
}
catch (FederationExecutionDoesNotExist &e) {
D.Out(pdDebug,
@@ -1474,5 +1475,5 @@
}} // certi::rtig
-// EOF $Id: FederationsList.cc,v 3.43 2007/11/13 13:25:40 rousse Exp $
+// EOF $Id: FederationsList.cc,v 3.44 2007/11/15 14:37:41 rousse Exp $
Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.42
retrieving revision 3.43
diff -u -b -r3.42 -r3.43
--- RTIG/RTIG_processing.cc 13 Nov 2007 13:25:40 -0000 3.42
+++ RTIG/RTIG_processing.cc 15 Nov 2007 14:37:41 -0000 3.43
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: RTIG_processing.cc,v 3.42 2007/11/13 13:25:40 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.43 2007/11/15 14:37:41 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -82,6 +82,11 @@
rep.exception = e_CouldNotOpenFED ;
strcpy(rep.exceptionReason,e._reason) ;
}
+ catch (FederationExecutionAlreadyExists e)
+ {
+ rep.exception = e_FederationExecutionAlreadyExists ;
+ strcpy(rep.exceptionReason,e._reason) ;
+ }
#endif
// Prepare answer for RTIA : store NetworkMessage rep
@@ -1285,4 +1290,4 @@
}} // namespace certi/rtig
-// $Id: RTIG_processing.cc,v 3.42 2007/11/13 13:25:40 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.43 2007/11/15 14:37:41 rousse Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- certi RTIA/FederationManagement.cc RTIA/RTIA.hh...,
certi-cvs <=