Class Exception
Defined in File Exception.hpp
Inheritance Relationships
Derived Types
public dds::core::AlreadyClosedError
(Class AlreadyClosedError)public dds::core::Error
(Class Error)public dds::core::IllegalOperationError
(Class IllegalOperationError)public dds::core::ImmutablePolicyError
(Class ImmutablePolicyError)public dds::core::InconsistentPolicyError
(Class InconsistentPolicyError)public dds::core::InvalidArgumentError
(Class InvalidArgumentError)public dds::core::InvalidDataError
(Class InvalidDataError)public dds::core::InvalidDowncastError
(Class InvalidDowncastError)public dds::core::NotEnabledError
(Class NotEnabledError)public dds::core::NullReferenceError
(Class NullReferenceError)public dds::core::OutOfResourcesError
(Class OutOfResourcesError)public dds::core::PreconditionNotMetError
(Class PreconditionNotMetError)public dds::core::TimeoutError
(Class TimeoutError)public dds::core::UnsupportedError
(Class UnsupportedError)
Class Documentation
-
class Exception
Exception: base class for specified DDS Exceptions.
DDS PIM Return Code
DDS-PSM-CXX Exception Class
std C++ Parent Exception
RETCODE_OK
Normal return; no exception
N/A
RETCODE_NO_DATA
Normal return with informational state attached
N/A
RETCODE_ERROR
std::logic_error
RETCODE_BAD_PARAMETER
std::invalid_argument
RETCODE_TIMEOUT
std::runtime_error
RETCODE_UNSUPPORTED
std::logic_error
RETCODE_ALREADY_DELETED
std::logic_error
RETCODE_ILLEGAL_OPERATION
std::logic_error
RETCODE_NOT_ENABLED
std::logic_error
RETCODE_PRECONDITION_NOT_MET
std::logic_error
RETCODE_IMMUTABLE_POLICY
std::logic_error
RETCODE_INCONSISTENT_POLICY
std::logic_error
RETCODE_OUT_OF_RESOURCES
std::runtime_error
The DDS-PSM-Cxx maps error codes to C++ exceptions defined in the dds::core namespace and inheriting from a base Exception class and the appropriate standard C++ exception. Table 7.3 lists the mapping between error codes as defined in the DDS PIM and C++ exceptions as used in this specification. Exceptions have value semantics; this means that they must always have deep copy semantics. The full list of exceptions is included in the file dds/core/Exceptions.hpp.
Subclassed by dds::core::AlreadyClosedError, dds::core::Error, dds::core::IllegalOperationError, dds::core::ImmutablePolicyError, dds::core::InconsistentPolicyError, dds::core::InvalidArgumentError, dds::core::InvalidDataError, dds::core::InvalidDowncastError, dds::core::NotEnabledError, dds::core::NullReferenceError, dds::core::OutOfResourcesError, dds::core::PreconditionNotMetError, dds::core::TimeoutError, dds::core::UnsupportedError
Public Functions
- virtual OMG_DDS_API const char * what () const =0
Retrieve information about the exception that was thrown.
Example
Exception information (of the NullReferenceError in this case)try { // Do something that will trigger a dds exception, like: dds::domain::DomainParticipant participant = dds::core::null; participant.domain_id(); } catch (const dds::core::Exception& e) { std::cout << e.what() << std::endl; }
Null reference: Reference[157] == dds::core::null ======================================================================================== Context : dds::domain::DomainParticipant::domain_id Date : Wed Oct 21 19:28:00 CET 2015 Node : DeLorean Process : flux_capacitor <15423> Thread : mr_fusion b6f25700 Internals : ReferenceImpl.hpp/157/V6.6.0 ---------------------------------------------------------------------------------------- Report : Null reference: Reference[157] == dds::core::null Internals : dds::core::Reference<DELEGATE>::delegate/ReferenceImpl.hpp/157
- Returns
Exception information
Protected Functions
-
inline OMG_DDS_API Exception()