| Visioscan Set SDK Libraries 1.3.5 Visioscan Set SDK Help documentation file for C++ and C++/CLI |

Loading...
Searching...
No Matches
SensorErrorException.h
1#pragma once
2#include <string>
3#include "TranscribableException.h"
4#ifdef STARFLEETTOOLBOX_EXPORTS
5#define SENSORERROREXCPT __declspec(dllexport)
6#else
7#define SENSORERROREXCPT __declspec(dllimport)
8#endif
9 using namespace std;
13 class SENSORERROREXCPT SensorErrorException : exception, public TranscribableException
14{
15 public:
20 explicit SensorErrorException(const char* message, const char* translateCode)
21 : _msg(message) {
22 SetTranslateCode(string(translateCode));
23 }
29 explicit SensorErrorException(string code, const string& message, string translateCode);
30
35 explicit SensorErrorException(const string& message, string translateCode)
36 : _msg(message) {
37 SetTranslateCode(translateCode);
38 }
39
44 virtual ~SensorErrorException() noexcept {}
45
50 virtual const char* what() const noexcept {
51 return _msg.c_str();
52 }
53
54 string GetErrorCode();
55 protected:
56 string _msg;
57 string _code = "";
58};
SensorErrorException
An exception used when the sensor returns an error related to a command excecution.
Definition SensorErrorException.h:14
SensorErrorException::what
virtual const char * what() const noexcept
Overload of message retrie.
Definition SensorErrorException.h:50
SensorErrorException::SensorErrorException
SensorErrorException(const char *message, const char *translateCode)
Copy constructor.
Definition SensorErrorException.h:20
SensorErrorException::SensorErrorException
SensorErrorException(const string &message, string translateCode)
Copy constructor.
Definition SensorErrorException.h:35
SensorErrorException::_msg
string _msg
Definition SensorErrorException.h:56
SensorErrorException::~SensorErrorException
virtual ~SensorErrorException() noexcept
Destructor.
Definition SensorErrorException.h:44