BAOS SDK v2  1.0.1
An SDK providing access to IP-BAOS devices through BAOS binary protocol version 2.x
Exception.h File Reference

Custom exceptions for the SDK. More...

#include "baos/BaosLib_export.h"
#include "wzcpp/features/error/Exception.h"
+ Include dependency graph for Exception.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 wz::baos
 Global BAOS sdk namespace.
 

Enumerations

enum class  ErrorCodes {
  BaosError = 2 ,
  SocketError = 3 ,
  AddressResolveError = 4 ,
  TCPConnectionError = 5 ,
  TCPConnectionClosed = 6 ,
  SocketRecvError = 7 ,
  SocketSendError = 8 ,
  SocketInitError = 9 ,
  SocketRxBufferToSmall = 10 ,
  ResponseError = 20 ,
  ResponseTimeoutError = 21 ,
  MaleformedTelegram = 22 ,
  ClosedConnection = 51 ,
  StoppedConnection = 52
}
 Custom error codes for each exception. More...
 

Functions

 DECLARE_WZ_EXCEPTION (WzBaosException, ErrorCodes::BaosError, wzcpp::error::WzBaseException)
 Generic exception from this SDK.
 
 DECLARE_WZ_EXCEPTION (WzSocketException, ErrorCodes::SocketError, WzBaosException)
 Thrown if errors occur in the underlying sockets.
 
 DECLARE_WZ_EXCEPTION (WzIpAddressResolveException, ErrorCodes::AddressResolveError, WzSocketException)
 Thrown if the ip address could not be resolved.
 
 DECLARE_WZ_EXCEPTION (WzTCPConnectionException, ErrorCodes::TCPConnectionError, WzSocketException)
 Thrown for error during establishing of the TCP connection.
 
 DECLARE_WZ_EXCEPTION (WzTCPConnectionClosedException, ErrorCodes::TCPConnectionClosed, WzSocketException)
 Thrown if the TCP connection is unexpectely closed.
 
 DECLARE_WZ_EXCEPTION (WzRecvException, ErrorCodes::SocketRecvError, WzSocketException)
 Thrown on error during a read on a socket.
 
 DECLARE_WZ_EXCEPTION (WzSendException, ErrorCodes::SocketSendError, WzSocketException)
 Thrown on error during a send to a socket.
 
 DECLARE_WZ_EXCEPTION (WzSocketInitException, ErrorCodes::SocketInitError, WzSocketException)
 Thrown if creation or initialization of the socket failed.
 
 DECLARE_WZ_EXCEPTION (WzRxBufferOverflowException, ErrorCodes::SocketRxBufferToSmall, WzSocketException)
 
 DECLARE_WZ_EXCEPTION (WzMaleformedTelegramException, ErrorCodes::MaleformedTelegram, WzBaosException)
 Thrown if incoming telegrams are not wellformed.
 
 DECLARE_WZ_EXCEPTION (WzResponseException, ErrorCodes::ResponseError, WzBaosException)
 Thrown if the response contains an errorcode other then success.
 
 DECLARE_WZ_EXCEPTION (WzResponseTimeoutException, ErrorCodes::ResponseTimeoutError, WzBaosException)
 Thrown if an expected response was not received in time.
 
 DECLARE_WZ_EXCEPTION (WzClosedConnectionException, ErrorCodes::ClosedConnection, WzBaosException)
 Thrown if the connection was not open for some task.
 
 DECLARE_WZ_EXCEPTION (WzStoppedConnectionException, ErrorCodes::StoppedConnection, WzBaosException)
 Thrown if attempted to open a connection which underlying system is not running.
 

Detailed Description

Custom exceptions for the SDK.