Visioscan Set SDK Libraries 1.0.14
Visioscan Set SDK Help documentation file for C++ and C++/CLI
 
Loading...
Searching...
No Matches
CommunicationException.h
1#pragma once
2#include <string>
3#ifdef STARFLEETTOOLBOX_EXPORTS
4#define COMMEXCEPT __declspec(dllexport)
5#else
6#define COMMEXCEPT __declspec(dllimport)
7#endif
8using namespace std;
9
13class COMMEXCEPT CommunicationException : exception
14{
15public:
20 explicit CommunicationException(const char* message)
21 : _msg(message) {}
27 explicit CommunicationException(int code, const string& message);
28
33 explicit CommunicationException(const string& message)
34 : _msg(message) {}
35
40 virtual ~CommunicationException() noexcept {}
41
46 virtual const char* what() const noexcept {
47 return _msg.c_str();
48 }
49
50 int GetErrorCode();
51protected:
52 string _msg;
53 int _code = -1;
54};
55
An Exception used when a communication error is detected.
Definition CommunicationException.h:14
virtual const char * what() const noexcept
Overload of message retrie.
Definition CommunicationException.h:46
virtual ~CommunicationException() noexcept
Destructor.
Definition CommunicationException.h:40
CommunicationException(const char *message)
Copy constructor.
Definition CommunicationException.h:20
string _msg
Definition CommunicationException.h:52
CommunicationException(const string &message)
Copy constructor.
Definition CommunicationException.h:33