[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi include/baseTypes.hh libCERTI/Exception.c...
From: |
certi-cvs |
Subject: |
[certi-cvs] certi include/baseTypes.hh libCERTI/Exception.c... |
Date: |
Tue, 29 Apr 2008 07:50:23 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: ROUSSELOT <rousse> 08/04/29 07:50:23
Modified files:
include : baseTypes.hh
libCERTI : Exception.cc Exception.hh
Log message:
Adding some internal tools to improve exception management
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/include/baseTypes.hh?cvsroot=certi&r1=3.10&r2=3.11
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Exception.cc?cvsroot=certi&r1=3.10&r2=3.11
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Exception.hh?cvsroot=certi&r1=3.5&r2=3.6
Patches:
Index: include/baseTypes.hh
===================================================================
RCS file: /sources/certi/certi/include/baseTypes.hh,v
retrieving revision 3.10
retrieving revision 3.11
diff -u -b -r3.10 -r3.11
--- include/baseTypes.hh 28 Sep 2007 15:22:01 -0000 3.10
+++ include/baseTypes.hh 29 Apr 2008 07:50:22 -0000 3.11
@@ -31,16 +31,19 @@
virtual Exception *cloneSelf() const throw() = 0 ;
virtual void throwSelf() const = 0 ;
const char* displayMe() const;
+ virtual long getType() = 0;
};
#define RTI_EXCEPT(A) \
class CERTI_EXPORT A : public Exception { \
public: \
static const char *_ex ; \
+ static long type ; \
A (const char *reason) : Exception(reason) { _name = #A ;
this->displayMe();} \
A (ULong serial, const char *reason = 0) \
: Exception(serial, reason) { _name = #A ; this->displayMe(); } \
A (A const &toCopy) : Exception(toCopy) { _name = #A ; this->displayMe();}
\
Exception *cloneSelf() const throw() { return (new A(_reason)); } \
void throwSelf() const { throw *this ; } \
+ long getType() {return type;}; \
};
Index: libCERTI/Exception.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Exception.cc,v
retrieving revision 3.10
retrieving revision 3.11
diff -u -b -r3.10 -r3.11
--- libCERTI/Exception.cc 22 Nov 2007 16:04:08 -0000 3.10
+++ libCERTI/Exception.cc 29 Apr 2008 07:50:22 -0000 3.11
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Exception.cc,v 3.10 2007/11/22 16:04:08 rousse Exp $
+// $Id: Exception.cc,v 3.11 2008/04/29 07:50:22 rousse Exp $
// ----------------------------------------------------------------------------
#include <assert.h>
@@ -137,6 +137,115 @@
const char *certi::NetworkError::_ex = "NetworkError" ;
const char *certi::NetworkSignal::_ex = "NetworkSignal" ;
+// TypeException managing (how to obtain TypeException from Exception name ?)
+long RTI::ArrayIndexOutOfBounds::type = certi::e_ArrayIndexOutOfBounds ;
+long RTI::AsynchronousDeliveryAlreadyDisabled::type =
certi::e_AsynchronousDeliveryAlreadyDisabled ;
+long RTI::AsynchronousDeliveryAlreadyEnabled::type =
certi::e_AsynchronousDeliveryAlreadyEnabled ;
+long RTI::AttributeAcquisitionWasNotRequested::type =
certi::e_AttributeAcquisitionWasNotRequested ;
+long RTI::AttributeAcquisitionWasNotCanceled::type =
certi::e_AttributeAcquisitionWasNotCanceled ;
+long RTI::AttributeAlreadyBeingAcquired::type =
certi::e_AttributeAlreadyBeingAcquired ;
+long RTI::AttributeAlreadyBeingDivested::type =
certi::e_AttributeAlreadyBeingDivested ;
+long RTI::AttributeAlreadyOwned::type = certi::e_AttributeAlreadyOwned ;
+long RTI::AttributeDivestitureWasNotRequested::type =
certi::e_AttributeDivestitureWasNotRequested ;
+long RTI::AttributeNotDefined::type = certi::e_AttributeNotDefined ;
+long RTI::AttributeNotKnown::type = certi::e_AttributeNotKnown ;
+long RTI::AttributeNotOwned::type = certi::e_AttributeNotOwned ;
+long RTI::AttributeNotPublished::type = certi::e_AttributeNotPublished ;
+long RTI::ConcurrentAccessAttempted::type = certi::e_ConcurrentAccessAttempted
;
+long RTI::CouldNotDiscover::type = certi::e_CouldNotDiscover ;
+long RTI::CouldNotOpenFED::type = certi::e_CouldNotOpenFED ;
+long RTI::CouldNotRestore::type = certi::e_CouldNotRestore ;
+long RTI::DeletePrivilegeNotHeld::type = certi::e_DeletePrivilegeNotHeld ;
+long RTI::DimensionNotDefined::type = certi::e_DimensionNotDefined ;
+long RTI::EnableTimeConstrainedPending::type =
certi::e_EnableTimeConstrainedPending ;
+long RTI::EnableTimeConstrainedWasNotPending::type =
certi::e_EnableTimeConstrainedWasNotPending ;
+long RTI::EnableTimeRegulationPending::type =
certi::e_EnableTimeRegulationPending ;
+long RTI::EnableTimeRegulationWasNotPending::type =
certi::e_EnableTimeRegulationWasNotPending ;
+long RTI::ErrorReadingFED::type = certi::e_ErrorReadingFED ;
+long RTI::EventNotKnown::type = certi::e_EventNotKnown ;
+long RTI::FederateAlreadyExecutionMember::type =
certi::e_FederateAlreadyExecutionMember ;
+long RTI::FederateInternalError::type = certi::e_FederateInternalError ;
+long RTI::FederateLoggingServiceCalls::type =
certi::e_FederateLoggingServiceCalls ;
+long RTI::FederateNotExecutionMember::type =
certi::e_FederateNotExecutionMember ;
+long RTI::FederateOwnsAttributes::type = certi::e_FederateOwnsAttributes ;
+long RTI::FederateWasNotAskedToReleaseAttribute::type =
certi::e_FederateWasNotAskedToReleaseAttribute ;
+long RTI::FederatesCurrentlyJoined::type = certi::e_FederatesCurrentlyJoined ;
+long RTI::FederationExecutionAlreadyExists::type =
certi::e_FederationExecutionAlreadyExists ;
+long RTI::FederationExecutionDoesNotExist::type =
certi::e_FederationExecutionDoesNotExist ;
+long RTI::FederationTimeAlreadyPassed::type =
certi::e_FederationTimeAlreadyPassed ;
+long RTI::HandleValuePairMaximumExceeded::type =
certi::e_HandleValuePairMaximumExceeded ;
+long RTI::InteractionClassNotDefined::type =
certi::e_InteractionClassNotDefined ;
+long RTI::InteractionClassNotKnown::type = certi::e_InteractionClassNotKnown ;
+long RTI::InteractionClassNotPublished::type =
certi::e_InteractionClassNotPublished ;
+long RTI::InteractionClassNotSubscribed::type =
certi::e_InteractionClassNotSubscribed ;
+long RTI::InteractionParameterNotDefined::type =
certi::e_InteractionParameterNotDefined ;
+long RTI::InteractionParameterNotKnown::type =
certi::e_InteractionParameterNotKnown ;
+long RTI::InvalidExtents::type = certi::e_InvalidExtents ;
+long RTI::InvalidFederationTime::type = certi::e_InvalidFederationTime ;
+long RTI::InvalidHandleValuePairSetContext::type =
certi::e_InvalidHandleValuePairSetContext ;
+long RTI::InvalidLookahead::type = certi::e_InvalidLookahead ;
+long RTI::InvalidOrderingHandle::type = certi::e_InvalidOrderingHandle ;
+long RTI::InvalidRegionContext::type = certi::e_InvalidRegionContext ;
+long RTI::InvalidResignAction::type = certi::e_InvalidResignAction ;
+long RTI::InvalidRetractionHandle::type = certi::e_InvalidRetractionHandle ;
+long RTI::InvalidTransportationHandle::type =
certi::e_InvalidTransportationHandle ;
+long RTI::MemoryExhausted::type = certi::e_MemoryExhausted ;
+long RTI::NameNotFound::type = certi::e_NameNotFound ;
+long RTI::ObjectClassNotDefined::type = certi::e_ObjectClassNotDefined ;
+long RTI::ObjectClassNotKnown::type = certi::e_ObjectClassNotKnown ;
+long RTI::ObjectClassNotPublished::type = certi::e_ObjectClassNotPublished ;
+long RTI::ObjectClassNotSubscribed::type = certi::e_ObjectClassNotSubscribed ;
+long RTI::ObjectNotKnown::type = certi::e_ObjectNotKnown ;
+long RTI::ObjectAlreadyRegistered::type = certi::e_ObjectAlreadyRegistered ;
+long RTI::OwnershipAcquisitionPending::type =
certi::e_OwnershipAcquisitionPending ;
+long RTI::RegionInUse::type = certi::e_RegionInUse ;
+long RTI::RegionNotKnown::type = certi::e_RegionNotKnown ;
+long RTI::RestoreInProgress::type = certi::e_RestoreInProgress ;
+long RTI::RestoreNotRequested::type = certi::e_RestoreNotRequested ;
+long RTI::RTIinternalError::type = certi::e_RTIinternalError ;
+long RTI::SpaceNotDefined::type = certi::e_SpaceNotDefined ;
+long RTI::SaveInProgress::type = certi::e_SaveInProgress ;
+long RTI::SaveNotInitiated::type = certi::e_SaveNotInitiated ;
+long RTI::SpecifiedSaveLabelDoesNotExist::type =
certi::e_SpecifiedSaveLabelDoesNotExist ;
+long RTI::SynchronizationPointLabelWasNotAnnounced::type =
certi::e_SynchronizationPointLabelWasNotAnnounced ;
+long RTI::TimeAdvanceAlreadyInProgress::type =
certi::e_TimeAdvanceAlreadyInProgress ;
+long RTI::TimeAdvanceWasNotInProgress::type =
certi::e_TimeAdvanceWasNotInProgress ;
+long RTI::TimeConstrainedAlreadyEnabled::type =
certi::e_TimeConstrainedAlreadyEnabled ;
+long RTI::TimeConstrainedWasNotEnabled::type =
certi::e_TimeConstrainedWasNotEnabled ;
+long RTI::TimeRegulationAlreadyEnabled::type =
certi::e_TimeRegulationAlreadyEnabled ;
+long RTI::TimeRegulationWasNotEnabled::type =
certi::e_TimeRegulationWasNotEnabled ;
+long RTI::UnableToPerformSave::type = certi::e_UnableToPerformSave ;
+long RTI::ValueCountExceeded::type = certi::e_ValueCountExceeded ;
+long RTI::ValueLengthExceeded::type = certi::e_ValueLengthExceeded ;
+
+// From certi.hh
+long certi::FederateNotPublishing::type = certi::e_FederateNotPublishing ;
+long certi::FederateNotSubscribing::type = certi::e_FederateNotSubscribing ;
+long certi::InvalidObjectHandle::type = certi::e_InvalidObjectHandle ;
+long certi::InvalidOrderType::type = certi::e_InvalidOrderType ;
+long certi::InvalidTransportType::type = certi::e_InvalidTransportType ;
+long certi::SecurityError::type = certi::e_SecurityError ;
+long certi::CouldNotOpenRID::type = certi::e_CouldNotOpenRID ;
+long certi::ErrorReadingRID::type = certi::e_ErrorReadingRID ;
+long certi::FederationAlreadyPaused::type = certi::e_FederationAlreadyPaused ;
+long certi::FederationNotPaused::type = certi::e_FederationNotPaused ;
+long certi::AttributeNotSubscribed::type = certi::e_AttributeNotSubscribed ;
+long certi::FederateAlreadyPaused::type = certi::e_FederateAlreadyPaused ;
+long certi::FederateDoesNotExist::type = certi::e_FederateDoesNotExist ;
+long certi::FederateNameAlreadyInUse::type = certi::e_FederateNameAlreadyInUse
;
+long certi::FederateNotPaused::type = certi::e_FederateNotPaused ;
+long certi::IDsupplyExhausted::type = certi::e_IDsupplyExhausted ;
+long certi::InvalidDivestitureCondition::type =
certi::e_InvalidDivestitureCondition ;
+long certi::InvalidFederationTimeDelta::type =
certi::e_InvalidFederationTimeDelta ;
+long certi::InvalidRoutingSpace::type = certi::e_InvalidRoutingSpace ;
+long certi::NoPauseRequested::type = certi::e_NoPauseRequested ;
+long certi::NoResumeRequested::type = certi::e_NoResumeRequested ;
+long certi::TooManyIDsRequested::type = certi::e_TooManyIDsRequested ;
+long certi::UnimplementedService::type = certi::e_UnimplementedService ;
+long certi::UnknownLabel::type = certi::e_UnknownLabel ;
+long certi::NetworkError::type = certi::e_NetworkError ;
+long certi::NetworkSignal::type = certi::e_NetworkSignal ;
+
static PrettyDebug PD_Exception("RTI_EXCEPTION",__FILE__);
RTI::Exception::~Exception()
Index: libCERTI/Exception.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Exception.hh,v
retrieving revision 3.5
retrieving revision 3.6
diff -u -b -r3.5 -r3.6
--- libCERTI/Exception.hh 22 Nov 2007 16:04:08 -0000 3.5
+++ libCERTI/Exception.hh 29 Apr 2008 07:50:23 -0000 3.6
@@ -20,7 +20,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Exception.hh,v 3.5 2007/11/22 16:04:08 rousse Exp $
+// $Id: Exception.hh,v 3.6 2008/04/29 07:50:23 rousse Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_EXCEPTION_HH
@@ -114,11 +114,34 @@
e_UnimplementedService,
e_UnknownLabel,
e_ValueCountExceeded,
- e_ValueLengthExceeded
+ e_ValueLengthExceeded,
+ e_AttributeAcquisitionWasNotCanceled,
+ e_DimensionNotDefined,
+ e_EnableTimeConstrainedPending,
+ e_EnableTimeConstrainedWasNotPending,
+ e_EnableTimeRegulationPending,
+ e_EnableTimeRegulationWasNotPending,
+ e_FederateLoggingServiceCalls,
+ e_HandleValuePairMaximumExceeded,
+ e_InteractionClassNotSubscribed,
+ e_InvalidHandleValuePairSetContext,
+ e_InvalidLookahead,
+ e_InvalidOrderingHandle,
+ e_InvalidRegionContext,
+ e_InvalidTransportationHandle,
+ e_OwnershipAcquisitionPending,
+ e_RegionInUse,
+ e_SynchronizationPointLabelWasNotAnnounced,
+ e_TimeConstrainedAlreadyEnabled,
+ e_TimeConstrainedWasNotEnabled,
+ e_TimeRegulationAlreadyEnabled,
+ e_TimeRegulationWasNotEnabled,
+ e_NetworkError,
+ e_NetworkSignal
} TypeException ;
} // namespace certi
#endif // _CERTI_EXCEPTION_HH
-// $Id: Exception.hh,v 3.5 2007/11/22 16:04:08 rousse Exp $
+// $Id: Exception.hh,v 3.6 2008/04/29 07:50:23 rousse Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi include/baseTypes.hh libCERTI/Exception.c...,
certi-cvs <=