Exception thrown when the expected type of the Variant does not match the actual type. More...
#include <TypeMismatchException.h>
Public Member Functions | |
swarmio::data::Variant::ValueCase | actual_type () const |
Get the actual type of the Variant. More... | |
swarmio::data::Variant::ValueCase | expected_type () const |
Get the expected type of the Variant. More... | |
TypeMismatchException (const char *message, const std::string &location, swarmio::data::Variant::ValueCase expectedType, swarmio::data::Variant::ValueCase actualType) | |
Constructor. More... | |
Public Member Functions inherited from swarmros::introspection::SchemaMismatchException | |
const char * | location () const |
Get the location of the mismatch. More... | |
SchemaMismatchException (const char *message, const std::string &location) | |
Constructor. More... | |
Public Member Functions inherited from swarmio::Exception | |
Exception (const char *message) | |
Construct a new Exception. More... | |
const char * | what () const noexceptoverride |
Get the error message. More... | |
Private Attributes | |
swarmio::data::Variant::ValueCase | _actualType |
The actual type of the variant. More... | |
swarmio::data::Variant::ValueCase | _expectedType |
The expected type of the variant. More... | |
Exception thrown when the expected type of the Variant does not match the actual type.
Definition at line 13 of file TypeMismatchException.h.
|
inline |
Constructor.
message | Message |
location | Location |
expectedType | Expected variant type |
actualType | Actual variant type |
Definition at line 39 of file TypeMismatchException.h.
|
inline |
Get the actual type of the Variant.
Definition at line 57 of file TypeMismatchException.h.
|
inline |
Get the expected type of the Variant.
Definition at line 47 of file TypeMismatchException.h.
|
private |
The actual type of the variant.
Definition at line 27 of file TypeMismatchException.h.
|
private |
The expected type of the variant.
Definition at line 21 of file TypeMismatchException.h.