RTI Connext Modern C++ API  Version 7.0.0

Classes

class  dds::core::Exception
 The abstract base class for all of the DDS exceptions which may be thrown by the API. More...
 
class  dds::core::Error
 A generic, unspecified Error. More...
 
class  dds::core::AlreadyClosedError
 Indicates that an object has been closed. More...
 
class  dds::core::IllegalOperationError
 Indicates that an operation was called under improper circumstances. More...
 
class  dds::core::NotAllowedBySecurityError
 Indicates that an operation on the DDS API fails because the security plugins do not allow it. More...
 
class  dds::core::ImmutablePolicyError
 Indicates that the application attempted to modify an immutable QoS policy. More...
 
class  dds::core::InconsistentPolicyError
 Indicates that the application specified a set of QoS policies that are not consistent with each other. More...
 
class  dds::core::InvalidArgumentError
 Indicates that the application passed an illegal parameter value into an operation. More...
 
class  dds::core::NotEnabledError
 A NotEnabledError is thrown when an operation is invoked on a dds::core::Entity that is not yet enabled. More...
 
class  dds::core::OutOfResourcesError
 Indicates that RTI Connext ran out of the resources needed to complete the operation. More...
 
class  dds::core::PreconditionNotMetError
 A PreconditionNotMetError is thrown when a pre-condition for the operation was not met. More...
 
class  dds::core::TimeoutError
 Indicates that an operation has timed out. More...
 
class  dds::core::UnsupportedError
 Indicates that the application used an unsupported operation. More...
 
class  dds::core::InvalidDowncastError
 Indicates that a downcast was incorrect. More...
 
class  dds::core::NullReferenceError
 Indicates an attempt to access a null object. More...
 

Detailed Description

Standard Exceptions

Any operation can can throw one of the following "standard exceptions" unless it indicates the opposite:

Operations that throw other exceptions will document them explicitly.

As a general rule constructors may only throw dds::core::Error. Destructors never throw, even in case of error.

Note that any operation can throw C++ standard exceptions such as std::bad_alloc.

Catching exceptions

The class dds::core::Exception is the abstract base class for all DDS exceptions. All concrete exceptions inherit also from subclasses of std::exception, so when you need to catch an exception you have flexibility on the level of detail you need. For example, if you are setting the DomainParticipant QoS:

try {
my_participant.qos(my_participant_qos);
} catch (const dds::core::InconsistentPolicyError& ipe) {
// catch a specific exception (documented in DomainParticipant::qos())
} catch (const std::exception& ex) {
// catch any other exception here, including other DDS exceptions
}