SDK Exceptions
#include <dolbyio/comms/exception.h>
Exception’s which can be thrown by the SDK and caught by user. These have been left defined
-
class exception : public exception
The base class for the SDK exceptions.
Subclassed by dolbyio::comms::async_operation_canceled, dolbyio::comms::certificate_exception, dolbyio::comms::conference_exception, dolbyio::comms::io_exception, dolbyio::comms::json_exception, dolbyio::comms::jwt_exception, dolbyio::comms::media_exception, dolbyio::comms::session_exception, dolbyio::comms::spatial_placement_exception
Public Functions
-
inline exception(const std::string &description)
The constructor that takes the description of the exception.
- Parameters:
description – A string indicating a reason for the exception.
-
inline const char *what() const noexcept override
Overrides to std::exception that returns a description of the exception.
- Returns:
A string that describes the exception.
-
inline exception(const std::string &description)
-
class async_operation_canceled : public dolbyio::comms::exception
The base class that describes exceptions that are thrown when an asynchronous operation is abruptly canceled.
Public Functions
-
async_operation_canceled(const std::string &reason)
The constructor that takes a reason for failure.
- Parameters:
reason – A string that indicates a reason for failure.
-
async_operation_canceled(const std::string &reason)
-
class dvc_error_exception : public dolbyio::comms::media_engine_exception
The class that describes a conference error which originates in the DVC library. This exception can also be listened for by attaching a handler for the dvc_error_exception type through the Conference Service.
Public Functions
-
dvc_error_exception(const std::string &reason)
The constructor that takes a reason for the DVC error.
- Parameters:
reason – Describes in detail why the error occurred.
-
dvc_error_exception(const std::string &reason)
-
class json_exception : public dolbyio::comms::exception
The base class for the JSON and depicts exceptions that are thrown when there is a JSON parsing error. This means an error in serializing or deserializing JSON string or object.
Public Functions
-
json_exception(std::string &&description, std::string &&path)
The constructor that takes a description of the exception.
- Parameters:
description – The description of the exception.
path – JSON object path
-
inline const std::string &path() const noexcept
The accessor that returns the full path of the exception.
- Returns:
A string that contains a full path of the exception.
-
inline const std::string &desc() const noexcept
The accessor that returns a description of the exception string.
- Returns:
A string that contains a description of the exception.
-
json_exception(std::string &&description, std::string &&path)
-
class jwt_exception : public dolbyio::comms::exception
Describes the JSON web token exceptions indicating that the authentication web token is not correct.
Public Functions
-
jwt_exception(const std::string &jwt_body)
The constructor that takes the body of the token.
- Parameters:
jwt_body – The body of the web token.
-
jwt_exception(const std::string &jwt_body)
-
class io_exception : public dolbyio::comms::exception
The base class for all IO exceptions that occur in the case of problems with opening sockets or files.
Subclassed by dolbyio::comms::http_exception, dolbyio::comms::restapi_exception, dolbyio::comms::security_check_exception, dolbyio::comms::signaling_channel_exception
Public Functions
-
io_exception(const std::string &description)
The constructor that takes the description of the exception.
- Parameters:
description – A string that describes the exception.
-
io_exception(const std::string &description)
-
class http_exception : public dolbyio::comms::io_exception
The class that describes the HTTP errors.
-
class restapi_exception : public dolbyio::comms::io_exception
The class that describes errors received from the backend service during REST API calls.
Subclassed by dolbyio::comms::invalid_token_exception
Public Functions
-
restapi_exception(int http_code, int rest_code, const std::string &err_reason, const std::string &err_description)
The constructor that takes the error code, reason, and description of the error from a server response.
- Parameters:
http_code – The HTTP code.
rest_code – The REST API code.
err_reason – The reason for the error.
err_description – The error description.
-
inline int http_code() const noexcept
The accessor for the HTTP code of the exception.
- Returns:
An integer that represents the HTTP code.
-
inline int rest_code() const noexcept
The accessor for the REST code of the exception.
- Returns:
An integer that represents the REST error code.
-
inline const std::string &reason() const noexcept
The accessor for the reason of the error.
- Returns:
A string that contains the reason for the error returned in the REST response.
-
inline const std::string &description() const noexcept
The accessor for the error description.
- Returns:
A string that contains the description of the error returned in the REST response.
-
restapi_exception(int http_code, int rest_code, const std::string &err_reason, const std::string &err_description)
-
class session_exception : public dolbyio::comms::exception
The class that describes errors related to the Session Service.
Subclassed by dolbyio::comms::services::session::state_exception
Public Functions
-
session_exception(const std::string &description)
The constructor that takes the error description.
- Parameters:
description – A string that describes the exception.
-
session_exception(const std::string &description)
-
class conference_exception : public dolbyio::comms::exception
The class that describes errors that occur in an active conference.
Subclassed by dolbyio::comms::conference_state_exception, dolbyio::comms::media_engine_exception
Public Functions
-
conference_exception(const std::string &description)
The constructor that takes the exception description.
- Parameters:
description – The description of the exception.
-
conference_exception(const std::string &description)
-
class conference_state_exception : public dolbyio::comms::conference_exception
The class that describes errors for attempted operations that require a different conference state.
Public Functions
-
conference_state_exception(const std::string ¤t, const std::string &required)
The constructor that takes the current the required state.
- Parameters:
current – The current state of a conference.
required – The required state of a conference.
-
inline const std::string ¤t_state() const noexcept
Returns the current state of a conference that is stored in the exception.
- Returns:
The current session state.
-
inline const std::string &required_state() const noexcept
Returns the required state of a conference that is stored in the exception.
- Returns:
A string that contains the required state of a conference.
-
conference_state_exception(const std::string ¤t, const std::string &required)
-
class media_exception : public dolbyio::comms::exception
The base exception class for exceptions originating from the media_engine.
Subclassed by dolbyio::comms::dvc_exception
Public Functions
-
inline media_exception(std::string &&description)
The constructor that takes a description of the exception.
- Parameters:
description – The description of the exception.
-
inline media_exception(std::string &&description)
-
class media_engine_exception : public dolbyio::comms::conference_exception
The base class describing exceptions stemming from media engine.
Subclassed by dolbyio::comms::create_answer_exception, dolbyio::comms::create_peer_connection_exception, dolbyio::comms::dvc_error_exception, dolbyio::comms::ice_candidate_exception, dolbyio::comms::media_stream_exception, dolbyio::comms::peer_connection_disconnected_exception, dolbyio::comms::peer_connection_failed_exception, dolbyio::comms::sdp_exception
Public Functions
-
media_engine_exception(const std::string &reason)
media_engine_exception constructor
- Parameters:
reason – describing the media engine exception.
-
media_engine_exception(const std::string &reason)
-
class create_answer_exception : public dolbyio::comms::media_engine_exception
The class that describes conference error where the WebRTC is unable to create an answer for the received offer.
Public Functions
-
create_answer_exception(const std::string &reason)
The constructor that takes a reason for error.
- Parameters:
reason – Describes in detail the reason for failing to create answer.
-
create_answer_exception(const std::string &reason)
-
class create_peer_connection_exception : public dolbyio::comms::media_engine_exception
The class that describes a conferencing error which may occur during a creation of an initial peer connection.
Public Functions
-
create_peer_connection_exception()
The default constructor.
-
create_peer_connection_exception()
-
class ice_candidate_exception : public dolbyio::comms::media_engine_exception
The class that describes a conferencing error which can occur during an initial setting of candidates for a connection when the remote description is successfully applied.
Public Functions
-
ice_candidate_exception(const std::string &reason)
The constructor that takes the reason for error.
- Parameters:
reason – Describes in detail the reason for the ice candidate error.
-
ice_candidate_exception(const std::string &reason)
-
class media_stream_exception : public dolbyio::comms::media_engine_exception
The exception that indicates an issue with the local media stream.
Public Functions
-
media_stream_exception()
The default constructor for the error.
-
media_stream_exception()
-
class peer_connection_disconnected_exception : public dolbyio::comms::media_engine_exception
The class that describes a conference error that results from a network connection issue. This error has a direct correlation with the disconnected PeerConnectionState. According to the WebRTC documentation, this state may be triggered intermittently and resolve without any action on less reliable networks. Therefore, this error is not considered fatal or non-recoverable like the PeerConnectionFailed state.
Public Functions
-
peer_connection_disconnected_exception(const std::string &reason)
The constructor that takes the reason for error.
- Parameters:
reason – Describes in detail the reason for the peer_connection_disconnected_exception.
-
peer_connection_disconnected_exception(const std::string &reason)
-
class peer_connection_failed_exception : public dolbyio::comms::media_engine_exception
The exception that is emitted when there is a failure detected with the peer connection to the server. Meaning One or more of the ICE transports on the connection is in the failed state. This error is strict and indicates that peer connection will not return to normal state. This exception can also be listened for by attaching a handler for the peer_connection_failed_exception type through the Conference Service.
Public Functions
-
peer_connection_failed_exception(const std::string &reason)
The constructor that takes a reason for failure.
- Parameters:
reason – Describes in detail why failure occurred.
-
peer_connection_failed_exception(const std::string &reason)
-
class sdp_exception : public dolbyio::comms::media_engine_exception
The class that describes conferencing errors that occur when setting a remote description fails. This means that there is an incompatibility in the offer, for example, that the offer contains not supported codecs.
Public Functions
-
sdp_exception(const std::string &reason)
The constructor that takes a reason for error.
- Parameters:
reason – Describes in detail the reason for remote description setup failure.
-
sdp_exception(const std::string &reason)
-
class spatial_placement_exception : public dolbyio::comms::exception
An error setting spatial coordinates.
Public Functions
-
spatial_placement_exception(const std::string &description)
The constructor that takes the description of the exception.
- Parameters:
description – A string indicating a reason for the exception.
-
spatial_placement_exception(const std::string &description)
-
class dvc_exception : public dolbyio::comms::media_exception
Describes exceptions originating from the DVC library.
Public Functions
-
inline dvc_exception(std::string &&description)
The constructor that takes a description of the exception.
- Parameters:
description – The description of the exception.
-
inline dvc_exception(std::string &&description)
-
class certificate_exception : public dolbyio::comms::exception
Describes the exception thrown if WebRTC fails to generate a certificate.
Public Functions
-
inline certificate_exception(std::string &&description)
The constructor that takes a description of the exception.
- Parameters:
description – The description of the exception.
-
inline certificate_exception(std::string &&description)
-
class security_check_exception : public dolbyio::comms::io_exception
The class for exceptions indicating that the CA certificates are not properly loaded.
Public Functions
-
security_check_exception(const std::string &message)
The security_check_exception constructor.
- Parameters:
message – A string that describes the error.
-
security_check_exception(const std::string &message)
-
class signaling_channel_exception : public dolbyio::comms::io_exception
The class that describes IO errors that occur on the signaling WebSocket. The user can also set a listener for this exception object using sdk::add_event_handler to emitted the event whenever a signaling error occurs.
Public Functions
-
signaling_channel_exception(const std::string &message)
The signaling_channel_exception constructor.
- Parameters:
message – A string that describes the error.
-
signaling_channel_exception(const std::string &message)
-
class invalid_token_exception : public dolbyio::comms::restapi_exception
The class that describes the rejected REST API requests caused by an invalid access token. The user can also set a listener for this exception object using sdk::add_event_handler. In such a case, the event will be emitted whenever a signaling error occurs.
Public Functions
-
invalid_token_exception(int http_code, int rest_code, const std::string &err_reason, const std::string &err_description)
The constructor that takes the error codes, reasons, and descriptions of the error that is in the server response.
- Parameters:
http_code – The HTTP code.
rest_code – The REST API code.
err_reason – The reason for the error.
err_description – The error description.
-
invalid_token_exception(int http_code, int rest_code, const std::string &err_reason, const std::string &err_description)