certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

certi ChangeLog RTIA/FederationManagement.cc RT...


From: certi-cvs
Subject: certi ChangeLog RTIA/FederationManagement.cc RT...
Date: Fri, 16 Nov 2007 15:04:22 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     ROUSSELOT <rousse>      07/11/16 15:04:22

Modified files:
        .              : ChangeLog 
        RTIA           : FederationManagement.cc FederationManagement.hh 
                         RTIA.hh RTIA_federate.cc 
        RTIG           : Federation.cc Federation.hh FederationsList.cc 
                         FederationsList.hh RTIG_processing.cc 
        libCERTI       : Exception.hh fed.cc 
        libRTI         : RTIambPrivateRefs.cc 

Log message:
        Better exception return on syntax error during FED file parsing

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/ChangeLog?cvsroot=certi&r1=3.32&r2=3.33
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/FederationManagement.cc?cvsroot=certi&r1=3.34&r2=3.35
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/FederationManagement.hh?cvsroot=certi&r1=3.18&r2=3.19
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA.hh?cvsroot=certi&r1=3.9&r2=3.10
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.50&r2=3.51
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.cc?cvsroot=certi&r1=3.68&r2=3.69
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.hh?cvsroot=certi&r1=3.42&r2=3.43
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/FederationsList.cc?cvsroot=certi&r1=3.44&r2=3.45
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/FederationsList.hh?cvsroot=certi&r1=3.34&r2=3.35
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&r1=3.43&r2=3.44
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Exception.hh?cvsroot=certi&r1=3.3&r2=3.4
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/fed.cc?cvsroot=certi&r1=3.12&r2=3.13
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambPrivateRefs.cc?cvsroot=certi&r1=3.5&r2=3.6

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/certi/certi/ChangeLog,v
retrieving revision 3.32
retrieving revision 3.33
diff -u -b -r3.32 -r3.33
--- ChangeLog   6 Nov 2007 10:05:06 -0000       3.32
+++ ChangeLog   16 Nov 2007 15:04:21 -0000      3.33
@@ -1,3 +1,44 @@
+2007-11-15 15:37  rousse
+
+       * RTIA/FederationManagement.cc, RTIA/RTIA.hh,
+         RTIA/RTIA_federate.cc, RTIG/FederationsList.cc,
+         RTIG/RTIG_processing.cc: Better return of reason exception on
+         failed create federation execution
+
+2007-11-15 11:09  rousse
+
+       * test/Billard/Billard.cc: Little things in order to better print
+         error message on create federation in Billard
+
+2007-11-13 14:25  rousse
+
+       * RTIA/FederationManagement.cc, RTIA/RTIA_federate.cc,
+         RTIG/Federation.cc, RTIG/FederationsList.cc,
+         RTIG/RTIG_processing.cc, libCERTI/Exception.hh,
+         libCERTI/Message.cc, libCERTI/Message_R.cc,
+         libCERTI/Message_W.cc, libCERTI/NetworkMessage.cc,
+         libCERTI/NetworkMessage.hh, libCERTI/NetworkMessage_RW.cc,
+         libRTI/RTIambPrivateRefs.cc, libRTI/RTIambassador.cc: Exception
+         raised in RTIG returns reason to RTIA
+
+2007-11-12 15:49  siron
+
+       * RTIA/RTIA_federate.cc, RTIA/TimeManagement.cc,
+         libCERTI/Exception.hh, libRTI/RTIambPrivateRefs.cc: End of the
+         enableAsynchronousDelivery implementation.
+
+2007-11-06 14:46  rousse
+
+       * RTIA/TimeManagement.cc: enable asynchronous delivery still in
+         progress...
+
+2007-11-06 11:05  rousse
+
+       * ChangeLog, RTIA/ObjectManagement.cc, RTIA/ObjectManagement.hh,
+         RTIA/TimeManagement.cc, libCERTI/ObjectClassBroadcastList.cc,
+         libRTI/RTIambassador.cc: reflectAttributeValues without timestamp
+         corrected (I hope implemented)
+
 2007-11-06 09:57  rousse
 
        * ChangeLog, RTIA/FederationManagement.cc: FR : Suppression du

Index: RTIA/FederationManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/FederationManagement.cc,v
retrieving revision 3.34
retrieving revision 3.35
diff -u -b -r3.34 -r3.35
--- RTIA/FederationManagement.cc        15 Nov 2007 14:37:41 -0000      3.34
+++ RTIA/FederationManagement.cc        16 Nov 2007 15:04:21 -0000      3.35
@@ -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.34 2007/11/15 14:37:41 rousse Exp $
+// $Id: FederationManagement.cc,v 3.35 2007/11/16 15:04:21 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -104,7 +104,7 @@
 createFederationExecution(const char *theName,
                           TypeException &e)
          throw ( FederationExecutionAlreadyExists,
-                 CouldNotOpenFED,
+                 CouldNotOpenFED,ErrorReadingFED,
                  RTIinternalError)
 {
     NetworkMessage requete, reponse ;
@@ -130,7 +130,7 @@
 
         comm->waitMessage(&reponse, 
NetworkMessage::CREATE_FEDERATION_EXECUTION,
                           federate);
-
+        // We have to see if C_F_E is OK.
         if (reponse.exception == e_NO_EXCEPTION)
             {
             strcpy(_nom_federation, theName);
@@ -153,9 +153,19 @@
                            "createFederationExecution on exception");
             throw FederationExecutionAlreadyExists (reponse.exceptionReason) ;
             }
+        else if (reponse.exception == e_ErrorReadingFED)
+            {
+            e = reponse.exception;
+            G.Out(pdGendoc,"exit FederationManagement::"
+                           "createFederationExecution on exception 
ErrorReadingFED");
+            throw ErrorReadingFED (reponse.exceptionReason) ;
+            }
         else
             {
             e = reponse.exception ;
+            G.Out(pdGendoc,"exit FederationManagement::"
+                           "createFederationExecution on exception 
RTIinternalError");
+            throw RTIinternalError (reponse.exceptionReason) ;
             D.Out(pdInit, "deja cree");
             }
         }
@@ -926,4 +936,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: FederationManagement.cc,v 3.34 2007/11/15 14:37:41 rousse Exp $
+// $Id: FederationManagement.cc,v 3.35 2007/11/16 15:04:21 rousse Exp $

Index: RTIA/FederationManagement.hh
===================================================================
RCS file: /sources/certi/certi/RTIA/FederationManagement.hh,v
retrieving revision 3.18
retrieving revision 3.19
diff -u -b -r3.18 -r3.19
--- RTIA/FederationManagement.hh        31 Oct 2007 09:42:27 -0000      3.18
+++ RTIA/FederationManagement.hh        16 Nov 2007 15:04:21 -0000      3.19
@@ -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.hh,v 3.18 2007/10/31 09:42:27 rousse Exp $
+// $Id: FederationManagement.hh,v 3.19 2007/11/16 15:04:21 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_RTIA_FEDERATION_MANAGEMENT
@@ -46,7 +46,7 @@
     // -- Create/Destroy --
     void createFederationExecution(const char *theName, TypeException &e)
          throw ( FederationExecutionAlreadyExists,
-                 CouldNotOpenFED,
+                 CouldNotOpenFED,ErrorReadingFED,
                  RTIinternalError);
     void destroyFederationExecution(const char *theName, TypeException &e);
 
@@ -122,4 +122,4 @@
 
 #endif // _CERTI_RTIA_FEDERATION_MANAGEMENT
 
-// $Id: FederationManagement.hh,v 3.18 2007/10/31 09:42:27 rousse Exp $
+// $Id: FederationManagement.hh,v 3.19 2007/11/16 15:04:21 rousse Exp $

Index: RTIA/RTIA.hh
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA.hh,v
retrieving revision 3.9
retrieving revision 3.10
diff -u -b -r3.9 -r3.10
--- RTIA/RTIA.hh        15 Nov 2007 14:37:41 -0000      3.9
+++ RTIA/RTIA.hh        16 Nov 2007 15:04:21 -0000      3.10
@@ -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.9 2007/11/15 14:37:41 rousse Exp $
+// $Id: RTIA.hh,v 3.10 2007/11/16 15:04:21 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_RTIA_HH
@@ -65,11 +65,11 @@
     void processNetworkMessage(NetworkMessage *);
     void processFederateRequest(Message *);
     void chooseFederateProcessing(Message *, Message &, TypeException &)
-        throw (CouldNotOpenFED,FederationExecutionAlreadyExists);
+       throw 
(CouldNotOpenFED,FederationExecutionAlreadyExists,ErrorReadingFED);
 };
 
 }} // namespace certi
 
 #endif // _CERTI_RTIA_HH
 
-// $Id: RTIA.hh,v 3.9 2007/11/15 14:37:41 rousse Exp $
+// $Id: RTIA.hh,v 3.10 2007/11/16 15:04:21 rousse Exp $

Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.50
retrieving revision 3.51
diff -u -b -r3.50 -r3.51
--- RTIA/RTIA_federate.cc       15 Nov 2007 14:37:41 -0000      3.50
+++ RTIA/RTIA_federate.cc       16 Nov 2007 15:04:21 -0000      3.51
@@ -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.50 2007/11/15 14:37:41 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.51 2007/11/16 15:04:21 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -89,7 +89,7 @@
 //! Choose federate processing.
 void
 RTIA::chooseFederateProcessing(Message *req, Message &rep, TypeException &e)
-        throw (CouldNotOpenFED,FederationExecutionAlreadyExists)
+       throw (CouldNotOpenFED,FederationExecutionAlreadyExists,ErrorReadingFED)
 {
     G.Out(pdGendoc,"enter RTIA::chooseFederateProcessing");
 
@@ -156,7 +156,8 @@
                   {        
                  int result = certi::fedparser::build(filename.c_str(),
                                                   rootObject, true);
-                 if (result) throw ErrorReadingFED("invalid .fed");
+std::cout<<"RTIA::chooseFederateProcessing result= "<<result<<std::endl;
+                 if (result != 0 ) throw ErrorReadingFED("invalid .fed");
                   }
               else if ( is_an_xml )
                   {
@@ -955,7 +956,11 @@
     }
     catch (ErrorReadingRID &e) {
         D.Out(pdExcept, "Catched %s Exception.", e._name);
-        rep.setException(e_ErrorReadingRID);
+        rep.setException(e_ErrorReadingRID,e._reason);
+    }
+    catch (ErrorReadingFED &e) {
+        D.Out(pdExcept, "Catched %s Exception.", e._name);
+        rep.setException(e_ErrorReadingFED,e._reason);
     }
     catch (EventNotKnown &e) {
         D.Out(pdExcept, "Catched %s Exception.", e._name);
@@ -1221,4 +1226,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: RTIA_federate.cc,v 3.50 2007/11/15 14:37:41 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.51 2007/11/16 15:04:21 rousse Exp $

Index: RTIG/Federation.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.cc,v
retrieving revision 3.68
retrieving revision 3.69
diff -u -b -r3.68 -r3.69
--- RTIG/Federation.cc  13 Nov 2007 13:25:40 -0000      3.68
+++ RTIG/Federation.cc  16 Nov 2007 15:04:22 -0000      3.69
@@ -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: Federation.cc,v 3.68 2007/11/13 13:25:40 rousse Exp $
+// $Id: Federation.cc,v 3.69 2007/11/16 15:04:22 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -116,7 +116,7 @@
                            AuditFile &audit_server,
                            const char *FEDid_name)
 #endif
-    throw (CouldNotOpenFED, ErrorReadingRID, MemoryExhausted, SecurityError,
+    throw (CouldNotOpenFED, ErrorReadingFED, MemoryExhausted, SecurityError,
            RTIinternalError)
     : federateHandles(1), objectHandles(1), saveInProgress(false),
       restoreInProgress(false), saveStatus(true), restoreStatus(true),
@@ -218,7 +218,7 @@
     if (!filefound) {
       cout << " --> cannot access." <<endl;
       cerr << "Next step will fail"<<endl;
-      G.Out(pdGendoc,"exit Federation::Federation on exception");
+      G.Out(pdGendoc,"exit Federation::Federation on exception 
CouldNotOpenFED");
       throw CouldNotOpenFED("RTIG cannot find FED file.");
     }
 
@@ -231,6 +231,7 @@
     if ( (fftry=fopen(FEDid,"r")) == NULL)
         {
         cout << "... failed : ";
+        G.Out(pdGendoc,"exit Federation::Federation on exception 
CouldNotOpenFED");
         throw CouldNotOpenFED("RTIG have found but cannot open FED file");
         }
     else
@@ -246,6 +247,7 @@
     // hope there is a . before fed or xml
     if ( filename[nbcar_filename-4] != '.' )
         {
+        G.Out(pdGendoc,"exit Federation::Federation on exception 
CouldNotOpenFED");
         throw CouldNotOpenFED("Incorrect FED file name, cannot find "
          "extension (character '.' is missing [or not in reverse 4th place])");
         }       
@@ -263,6 +265,7 @@
         D.Out(pdTrace, "Trying to use .xml file");
         } 
     else {
+        G.Out(pdGendoc,"exit Federation::Federation on exception 
CouldNotOpenFED");
         throw CouldNotOpenFED("Incorrect FED file name : nor .fed nor .xml 
file");
     }
        
@@ -274,7 +277,11 @@
         if ( is_a_fed )
             {
            int err = fedparser::build(filename.c_str(), root, verbose);
-           if (err) throw ErrorReadingFED("");
+           if (err != 0 ) 
+                {
+                G.Out(pdGendoc,"exit Federation::Federation on exception 
ErrorReadingFED");                
+                throw ErrorReadingFED("fed parser found error in FED file");
+               }
            
             // Retrieve the FED file last modification time(for Audit)
             STAT_STRUCT StatBuffer ;
@@ -318,6 +325,7 @@
             }
             else {
                 cout << "nor fed nor xml" << endl ;
+                G.Out(pdGendoc,"exit Federation::Federation on exception 
CouldNotOpenFED");
                throw CouldNotOpenFED("Incorrect FED file name : nor fed nor 
xml");
            }
         }
@@ -2193,5 +2201,5 @@
 
 }} // namespace certi/rtig
 
-// $Id: Federation.cc,v 3.68 2007/11/13 13:25:40 rousse Exp $
+// $Id: Federation.cc,v 3.69 2007/11/16 15:04:22 rousse Exp $
 

Index: RTIG/Federation.hh
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.hh,v
retrieving revision 3.42
retrieving revision 3.43
diff -u -b -r3.42 -r3.43
--- RTIG/Federation.hh  28 Sep 2007 14:07:53 -0000      3.42
+++ RTIG/Federation.hh  16 Nov 2007 15:04:22 -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: Federation.hh,v 3.42 2007/09/28 14:07:53 rousse Exp $
+// $Id: Federation.hh,v 3.43 2007/11/16 15:04:22 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_RTIG_FEDERATION_HH
@@ -90,7 +90,7 @@
 #else
         Federation(const char *, Handle, SocketServer &, AuditFile &, const 
char *)
 #endif
-        throw (CouldNotOpenFED, ErrorReadingRID, MemoryExhausted, 
SecurityError,
+        throw (CouldNotOpenFED, ErrorReadingFED, MemoryExhausted, 
SecurityError,
                RTIinternalError);
 
     ~Federation();
@@ -576,4 +576,4 @@
 
 #endif // _CERTI_RTIG_FEDERATION_HH
 
-// $Id: Federation.hh,v 3.42 2007/09/28 14:07:53 rousse Exp $
+// $Id: Federation.hh,v 3.43 2007/11/16 15:04:22 rousse Exp $

Index: RTIG/FederationsList.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/FederationsList.cc,v
retrieving revision 3.44
retrieving revision 3.45
diff -u -b -r3.44 -r3.45
--- RTIG/FederationsList.cc     15 Nov 2007 14:37:41 -0000      3.44
+++ RTIG/FederationsList.cc     16 Nov 2007 15:04:22 -0000      3.45
@@ -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.44 2007/11/15 14:37:41 rousse Exp $
+// $Id: FederationsList.cc,v 3.45 2007/11/16 15:04:22 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -160,7 +160,7 @@
 #endif
     throw (FederationExecutionAlreadyExists,
            CouldNotOpenFED,
-           ErrorReadingRID,
+           ErrorReadingFED,
            MemoryExhausted,
            SecurityError,
            RTIinternalError)
@@ -195,9 +195,14 @@
         }
     catch (RTI::CouldNotOpenFED& e) {
         D.Out(pdInit, "Federation constructor : Could not open FED file.");
-        G.Out(pdGendoc,"exit FederationsList::createFederation on exception");
+        G.Out(pdGendoc,"exit FederationsList::createFederation on exception 
CouldNotOpenFED");
         throw CouldNotOpenFED(e._reason);
         }
+    catch (RTI::ErrorReadingFED &e) {
+        D.Out(pdInit, "Federation constructor : Could not read FED file (maybe 
incorrect).");
+        G.Out(pdGendoc,"exit FederationsList::createFederation on exception 
ErrorReadingFED");
+        throw ErrorReadingFED(e._reason);
+        }
 
     
 #endif
@@ -1475,5 +1480,5 @@
 
 }} // certi::rtig
 
-// EOF $Id: FederationsList.cc,v 3.44 2007/11/15 14:37:41 rousse Exp $
+// EOF $Id: FederationsList.cc,v 3.45 2007/11/16 15:04:22 rousse Exp $
 

Index: RTIG/FederationsList.hh
===================================================================
RCS file: /sources/certi/certi/RTIG/FederationsList.hh,v
retrieving revision 3.34
retrieving revision 3.35
diff -u -b -r3.34 -r3.35
--- RTIG/FederationsList.hh     28 Sep 2007 14:07:54 -0000      3.34
+++ RTIG/FederationsList.hh     16 Nov 2007 15:04:22 -0000      3.35
@@ -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.hh,v 3.34 2007/09/28 14:07:54 rousse Exp $
+// $Id: FederationsList.hh,v 3.35 2007/11/16 15:04:22 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_RTIG_FEDERATIONS_LIST_HH
@@ -60,7 +60,7 @@
 #endif
         throw (FederationExecutionAlreadyExists,
                CouldNotOpenFED,
-               ErrorReadingRID,
+               ErrorReadingFED,
                MemoryExhausted,
                SecurityError,
                RTIinternalError);
@@ -562,4 +562,4 @@
 
 #endif // _CERTI_RTIG_FEDERATIONS_LIST_HH
 
-// $Id: FederationsList.hh,v 3.34 2007/09/28 14:07:54 rousse Exp $
+// $Id: FederationsList.hh,v 3.35 2007/11/16 15:04:22 rousse Exp $

Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.43
retrieving revision 3.44
diff -u -b -r3.43 -r3.44
--- RTIG/RTIG_processing.cc     15 Nov 2007 14:37:41 -0000      3.43
+++ RTIG/RTIG_processing.cc     16 Nov 2007 15:04:22 -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: RTIG_processing.cc,v 3.43 2007/11/15 14:37:41 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.44 2007/11/16 15:04:22 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -47,7 +47,12 @@
     G.Out(pdGendoc,"BEGIN ** CREATE FEDERATION SERVICE **");
     G.Out(pdGendoc,"enter RTIG::processCreateFederation");
 
-    if (federation == NULL) throw RTIinternalError("Invalid Federation Name.");
+    if (federation == NULL) 
+        {
+        G.Out(pdGendoc,"exit  RTIG::processCreateFederation on exception 
RTIinternalError");        
+        throw RTIinternalError("Invalid Federation Name.");
+        }
+
     auditServer << "Federation Name : " << federation ;
     Handle h = federationHandles.provide();
 
@@ -60,6 +65,7 @@
     com_mc = new SocketMC();
     if (com_mc == NULL) {
         D.Out(pdExcept, "Unable to allocate Multicast socket.");
+        G.Out(pdGendoc,"exit  RTIG::processCreateFederation on exception 
RTIinternalError")
         throw RTIinternalError("Unable to allocate Multicast socket.");
     }
 
@@ -72,6 +78,7 @@
     ClientSockets.push_front(com_mc);
 
 #else
+    rep.exception = e_NO_EXCEPTION ;
     // We catch createFederation because it is useful to send
     // exception reason to RTIA 
     try {
@@ -82,17 +89,24 @@
         rep.exception = e_CouldNotOpenFED ;
         strcpy(rep.exceptionReason,e._reason) ;
         }
+    catch (ErrorReadingFED e)
+        {
+        rep.exception = e_ErrorReadingFED ;
+        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
     rep.type = NetworkMessage::CREATE_FEDERATION_EXECUTION ;
+    if ( rep.exception == e_NO_EXCEPTION )
+        {
     rep.federation = h ;
     strcpy(rep.FEDid,FEDid) ;
+        }
 
     G.Out(pdGendoc,"processCreateFederation===>write");
 
@@ -1290,4 +1304,4 @@
 
 }} // namespace certi/rtig
 
-// $Id: RTIG_processing.cc,v 3.43 2007/11/15 14:37:41 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.44 2007/11/16 15:04:22 rousse Exp $

Index: libCERTI/Exception.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Exception.hh,v
retrieving revision 3.3
retrieving revision 3.4
diff -u -b -r3.3 -r3.4
--- libCERTI/Exception.hh       13 Nov 2007 13:25:40 -0000      3.3
+++ libCERTI/Exception.hh       16 Nov 2007 15:04:22 -0000      3.4
@@ -20,7 +20,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Exception.hh,v 3.3 2007/11/13 13:25:40 rousse Exp $
+// $Id: Exception.hh,v 3.4 2007/11/16 15:04:22 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_EXCEPTION_HH
@@ -52,6 +52,7 @@
     e_CouldNotRestore,
     e_DeletePrivilegeNotHeld,
     e_ErrorReadingRID,
+    e_ErrorReadingFED,
     e_EventNotKnown,
     e_FederateAlreadyPaused,
     e_FederateAlreadyExecutionMember,
@@ -120,4 +121,4 @@
 
 #endif // _CERTI_EXCEPTION_HH
 
-// $Id: Exception.hh,v 3.3 2007/11/13 13:25:40 rousse Exp $
+// $Id: Exception.hh,v 3.4 2007/11/16 15:04:22 rousse Exp $

Index: libCERTI/fed.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/fed.cc,v
retrieving revision 3.12
retrieving revision 3.13
diff -u -b -r3.12 -r3.13
--- libCERTI/fed.cc     31 Oct 2007 10:30:20 -0000      3.12
+++ libCERTI/fed.cc     16 Nov 2007 15:04:22 -0000      3.13
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: fed.cc,v 3.12 2007/10/31 10:30:20 erk Exp $
+// $Id: fed.cc,v 3.13 2007/11/16 15:04:22 rousse Exp $
 // ----------------------------------------------------------------------------
 
 // CERTI header
@@ -49,6 +49,7 @@
 
 extern FILE *yyin ;
 int yyparse();
+int yyrestart(FILE*);
 
 namespace certi {
 namespace fedparser {
@@ -102,6 +103,9 @@
     federate = "" ;
     attribute = 0 ;
     parameter = 0 ;
+   /* we may need to restart parsing after previous parse error */
+    rewind(yyin);
+    yyrestart(yyin);
     int result = yyparse();    
     fclose(file);
     return result ;
@@ -393,4 +397,4 @@
 
 }} // namespaces
 
-// $Id: fed.cc,v 3.12 2007/10/31 10:30:20 erk Exp $
+// $Id: fed.cc,v 3.13 2007/11/16 15:04:22 rousse Exp $

Index: libRTI/RTIambPrivateRefs.cc
===================================================================
RCS file: /sources/certi/certi/libRTI/RTIambPrivateRefs.cc,v
retrieving revision 3.5
retrieving revision 3.6
diff -u -b -r3.5 -r3.6
--- libRTI/RTIambPrivateRefs.cc 13 Nov 2007 13:25:40 -0000      3.5
+++ libRTI/RTIambPrivateRefs.cc 16 Nov 2007 15:04:22 -0000      3.6
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: RTIambPrivateRefs.cc,v 3.5 2007/11/13 13:25:40 rousse Exp $
+// $Id: RTIambPrivateRefs.cc,v 3.6 2007/11/16 15:04:22 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -217,6 +217,11 @@
           throw ErrorReadingRID(msg->getExceptionReason());
       } break ;
 
+      case e_ErrorReadingFED: {
+          D.Out(pdExcept, "Throwing e_ErrorReadingFED exception.");
+          throw ErrorReadingFED(msg->getExceptionReason());
+      } break ;
+
       case e_EventNotKnown: {
           D.Out(pdExcept, "Throwing e_EventNotKnown exception.");
           throw EventNotKnown(msg->getExceptionReason());
@@ -537,4 +542,4 @@
     }
 }
 
-// $Id: RTIambPrivateRefs.cc,v 3.5 2007/11/13 13:25:40 rousse Exp $
+// $Id: RTIambPrivateRefs.cc,v 3.6 2007/11/16 15:04:22 rousse Exp $




reply via email to

[Prev in Thread] Current Thread [Next in Thread]