Exceptions

Contains all the MicroStrain custom exceptions that can be thrown in MSCL

Error
public
std.exception
Error
Error_BadDataType
Error_Communication
Error_Connection
Error_InertialCmdFailed
and 4 other children

The generic MicroStrain exception (base class)

Error
Error() : m_description("MSCL has thrown an exception.")

Initializes the Error object with the default description

Error
Error(
const std::string &description
) : m_description(description)

Initializes the Error object with a custom description

Parameters
description
const std::string&

the description of the error to be thrown

what
const char* what () const throw ()

overriding the default std::exception what() function, gets the description of the thrown exception

Error_NotSupported
public
Error
Error_NotSupported

A command/feature was attempted to be used that was not supported.

Error_NotSupported
Error_NotSupported(): Error("This feature is not supported.")

Initializes the Error_NotSupported object with a default description

Error_NotSupported
Error_NotSupported(
const std::string &description
) : Error(description)

Initializes the Error_NotSupported object with a custom description

Parameters
description
const std::string&

the description of the error to be thrown

Error_NoData
public
Error
Error_NoData

There is no data available to be accessed

Error_NoData
Error_NoData(): Error("No data is available.")

Initializes the Error_NoData object with a default description

Error_NoData
Error_NoData(
const std::string &description
): Error(description)

Initializes the Error_NoData object with a custom description

Parameters
description
const std::string&

the description of the error to be thrown

Error_BadDataType
public
Error
Error_BadDataType

Data of one type was accessed as another type (simple_any)

Error_BadDataType
Error_BadDataType() : Error("Data was accessed using the wrong data type.")

Intializes the Error_BadDataType object with a default description

Error_UnknownSampleRate
public
Error
Error_UnknownSampleRate

The sample rate is invalid or unknown for the given device

Error_UnknownSampleRate
Error_UnknownSampleRate() : Error("Unknown Sample Rate.")

Initializes the Error_UnknownSampleRate object with a default description

Error_UnknownSampleRate
Error_UnknownSampleRate(
const std::string &description
) : Error(description)

Initializes the Error_UnknownSampleRate object with a custom description

Parameters
description
const std::string&

the description of the error to be thrown

Error_Communication
public
Error
Error_Communication
Error_NodeCommunication

The exception for failing to communicate with a device.

Error_Communication
Error_Communication() : Error("Failed to communicate with the device.")

Initializes the Error_Communication object.

Error_Communication
Error_Communication(
const std::string &description
) : Error(description)

Initializes the Error_Communication object.

Parameters
description
const std::string&

the description to set

Error_NodeCommunication
public
Error_Communication
Error_NodeCommunication

The exception for failing to communicate with a WirelessNode.

Error_NodeCommunication
Error_NodeCommunication(
uint16 nodeAddress
): Error_Communication("Failed to communicate with the Wireless Node."), m_nodeAddress(nodeAddress)

Initializes the Error_NodeCommunication object.

Parameters
nodeAddress
uint16

The node address of the WirelessNode that failed to communicate.

Error_NodeCommunication
Error_NodeCommunication(
uint16 nodeAddress,
const std::string &description
): Error_Communication(description), m_nodeAddress(nodeAddress)

Initializes the Error_NodeCommunication object.

Parameters
nodeAddress
uint16

The node address of the WirelessNode that failed to communicate.

description
const std::string&

the description to set

nodeAddress
const uint16 nodeAddress() const throw ()

gets the node address of the WirelessNode that failed to communicate

Error_Connection
public
Error
Error_Connection
Error_InvalidSerialPort
Error_InvalidTcpServer
Error_InvalidUnixSocket

The generic connection exception.

Error_Connection
Error_Connection(): Error("Connection error."), m_code(-1)

Initializes the Error_Connection object, sets the error code to a default of -1

Error_Connection
Error_Connection(
int code
): Error("Connection error."), m_code(code)

Initializes the Error_Connection object

Parameters
code
int

the exception error code

Error_Connection
Error_Connection(
const std::string &description
): Error(description), m_code(-1)

Initializes the Error_Connection object

Parameters
description
const std::string&

the description to set

Error_Connection
Error_Connection(
const std::string &description,
int code
): Error(description), m_code(code)

Initializes the Error_Connection object

Parameters
description
const std::string&

the description to set

code
int

the exception error code

code
const int code() const throw ()

gets the exception error code (system error codes, or -1 by default)

Error_InvalidSerialPort
public
Error_Connection
Error_InvalidSerialPort

There was an error with the specified COM Port.

See Also

Error_Connection

Error_InvalidSerialPort
Error_InvalidSerialPort(
int code
): Error_Connection("Invalid Com Port.", code)

Initializes the Error_InvalidSerialPort object

Parameters
code
int

the exception error code

Error_InvalidTcpServer
public
Error_Connection
Error_InvalidTcpServer

There was an error with the specified TCP/IP Server.

See Also

Error_Connection

Error_InvalidTcpServer
Error_InvalidTcpServer(
int code,
const std::string &message
): Error_Connection("Invalid TCP/IP Server: " + message, code)

Initializes the Error_InvalidTcpServer object

Parameters
code
int

the exception error code

Error_InvalidUnixSocket
public
Error_Connection
Error_InvalidUnixSocket

There was an error with the specified Unix Socket.

See Also

Error_Connection

Error_InvalidUnixSocket
Error_InvalidUnixSocket(
int code,
const std::string &message
): Error_Connection("Invalid Unix Socket: " + message, code)

Initializes the Error_InvalidUnixSocket object

Parameters
code
int

the exception error code

Error_InertialCmdFailed
public
Error
Error_InertialCmdFailed

The Inertial command has failed

Error_InertialCmdFailed
Error_InertialCmdFailed(): Error("The Inertial command has failed."), m_code(-1)

Initializes the Error_InertialCmdFailed object, sets the error code to a default of -1

Error_InertialCmdFailed
Error_InertialCmdFailed(
int code
): Error("The Inertial command has failed."), m_code(code)

Initializes the Error_InertialCmdFailed object

Parameters
code
int

the exception error code

code
const int code() const throw ()

gets the exception error code

Error_InvalidConfig
public
Error
Error_InvalidConfig
Error_InvalidNodeConfig

The Configuration is invalid.

Error_InvalidConfig
Error_InvalidConfig(
const ConfigIssues &issues
): Error("Invalid Configuration."), m_issues(issues)

Initializes the Error_InvalidConfig object

Parameters
issues
const ConfigIssues&

The ConfigIssues that caused the invalid configuration exception.

issues
ConfigIssues issues() const throw ()

Gets the ConfigIssues that caused the invalid configuration exception.

Error_InvalidNodeConfig
public
Error_InvalidConfig
Error_InvalidNodeConfig

The Configuration for a WirelessNode is invalid.

Error_InvalidNodeConfig
Error_InvalidNodeConfig(
const ConfigIssues &issues,
uint16 nodeAddress
) : Error_InvalidConfig(issues), m_nodeAddress(nodeAddress)

Initializes the Error_InvalidNodeConfig object

Parameters
issues
const ConfigIssues&

The ConfigIssues that caused the invalid configuration exception.

nodeAddress
const uint16 nodeAddress() const throw ()

Gets the node address of the Node that this exception pertains to.