Visioscan Set SDK Libraries 1.0.28
Visioscan Set SDK Help documentation file for C++ and C++/CLI
 
Loading...
Searching...
No Matches
CommunicationException.h
1#pragma once
2#include <string>
3#include "TranscribableException.h"
4#ifdef STARFLEETTOOLBOX_EXPORTS
5#define COMMEXCEPT __declspec(dllexport)
6#else
7#define COMMEXCEPT __declspec(dllimport)
8#endif
9using namespace std;
10
14class COMMEXCEPT CommunicationException : exception, public TranscribableException
15{
16public:
21 explicit CommunicationException(const char* message, const char* translateCode)
22 : _msg(message) {
23 SetTranslateCode(string(translateCode));
24 }
30 explicit CommunicationException(int code, const string& message, string translateCode);
31
36 explicit CommunicationException(const string& message, string translateCode)
37 : _msg(message) {
38 SetTranslateCode(string(translateCode));
39 }
40
45 virtual ~CommunicationException() noexcept {}
46
51 virtual const char* what() const noexcept {
52 return _msg.c_str();
53 }
54
55 int GetErrorCode();
56protected:
57 string _msg;
58 int _code = -1;
59};
60
An Exception used when a communication error is detected.
Definition CommunicationException.h:15
virtual const char * what() const noexcept
Overload of message retrie.
Definition CommunicationException.h:51
CommunicationException(const char *message, const char *translateCode)
Copy constructor.
Definition CommunicationException.h:21
virtual ~CommunicationException() noexcept
Destructor.
Definition CommunicationException.h:45
string _msg
Definition CommunicationException.h:57
CommunicationException(const string &message, string translateCode)
Copy constructor.
Definition CommunicationException.h:36