DAVID4 SDK  1.8.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ErrorCodes.h
1 //=============================================================================
2 // See License in Related Pages
3 //=============================================================================
4 
5 //=============================================================================
6 // This file was generated automatically.
7 // Do not modify this file.
8 //=============================================================================
9 
10 #pragma once
11 
12 #ifndef DAVID_SDK_ERROR_CODES_H
13 #define DAVID_SDK_ERROR_CODES_H
14 
15 #include <string>
16 
17 //=============================================================================
18 // ErrorCode
19 //=============================================================================
20 
21 namespace david {
22 
23 /// Defines error codes.
24 ///
26 {
27 
28  //-------------------------------------------------------------------------
29  // Success values.
30  //-------------------------------------------------------------------------
31 
32  OK = 0, ///< All ok.
33 
34  //-------------------------------------------------------------------------
35  // General errors.
36  //-------------------------------------------------------------------------
37 
38  Error_InvalidArgument = -100, ///< One or more arguments of function call are not valid.
39  Error_FormatNotAvailable = -101, ///< Format is not available.
40  Error_InvalidFormat = -102, ///< Invalid format.
41  Error_NoAccess = -103, ///< General access denied error.
42  Error_MissingObject = -104, ///< Important object is missing.
43  Error_OutOfMemory = -105, ///< Failed to allocate necessary memory.
44  Error_Abort = -106, ///< Operation aborted.
45  Error_Fail = -107, ///< Unspecified failure.
46  Error_NotLicensed = -108, ///< Software license does not support this request.
47  Error_NotImplemented = -109, ///< The requested function is not implemented.
48 
49  //-------------------------------------------------------------------------
50  // Typical IO errors.
51  //-------------------------------------------------------------------------
52 
53  Error_InvalidPath = -200, ///< Invalid path syntax.
54  Error_FileNotFound = -201, ///< Could not find the specified file.
55  Error_DirectoryNotFound = -202, ///< Could not find the specified directory.
56  Error_MissingFilename = -203, ///< The specified path does not contain a file name.
57  Error_InconsistentBuffer = -204, ///< Buffer size differs from expected buffer size.
58  Error_InvalidVersion = -205, ///< Invalid or unsupported version.
59 
60  //-------------------------------------------------------------------------
61  // Device related errors.
62  //-------------------------------------------------------------------------
63 
64  Error_DeviceNotAvailable = -300, ///< Device is not available / not found.
65  Error_NoLiveImage = -301, ///< Can not get live image from camera.
66  Error_ActuatorStalled = -302, ///< Actuator stalled. Required torque might be too high.
67 
68  //-------------------------------------------------------------------------
69  // Special calibration errors.
70  //-------------------------------------------------------------------------
71 
72  Error_CameraCalibration = -400, ///< Camera calibration failed.
73  Error_ProjectorCalibration = -401, ///< Projector calibration failed.
74 
75  //-------------------------------------------------------------------------
76  // Scanning errors.
77  //-------------------------------------------------------------------------
78 
79  Error_ScanFailed = -500, ///< Scan failed.
80  Error_NotCalibrated = -501, ///< Scanner is not calibrated.
81 
82  //-------------------------------------------------------------------------
83  // Special 'Shape Fusion' errors.
84  //-------------------------------------------------------------------------
85 
86  Error_AlignFailed = -600, ///< Alignment failed.
87  Error_InvalidMeshId = -601, ///< One or more mesh IDs are invalid.
88 
89  //-------------------------------------------------------------------------
90  // Critical errors related to the connection between client and server.
91  //-------------------------------------------------------------------------
92 
93  ConnectionErrors = -30000, ///< Errors related to the RPC connection between client and server. All errors below this value are connection errors.
94  Error_ConnectionFailed = -30001, ///< Connection to server failed.
95  Error_ConnectionLost = -30002, ///< Lost connection between client and server.
96 
97  ConnectionBinaryErrors = -31000, ///< Special connection errors related to binary transfer of data via binary channel.
98  Error_BinarySetup = -31001, ///< Setup of binary channel failed.
99  Error_BinaryRead = -31002, ///< Reading binary data from server failed.
100  Error_BinaryWrite = -31003, ///< Writing binary data to server failed.
101 
102  ConnectionProtocolErrors = -32000, ///< Special connection errors related to remote procedure calls. Range [-32099, -32000] reserved for implementation-defined server protocol errors.
103  Error_RpcClientVersion = -32001, ///< Invalid client version that is not supported by the server.
104  Error_RpcInvalidRequest = -32600, ///< The JSON sent is not a valid Request object.
105  Error_RpcMethodNotFound = -32601, ///< The method does not exist / is not available.
106  Error_RpcInvalidParams = -32602, ///< Invalid method parameter(s).
107  Error_RpcInternal = -32603, ///< Internal JSON-RPC error.
108  Error_RpcParse = -32700, ///< Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
109 
110  Error_DavidInternal = -40000, ///< Internal DAVID error.
111 
112 };
113 
114 
115 //=============================================================================
116 // Global functions
117 //=============================================================================
118 
119 /// Returns a default (standard) textual description for a given error code.
120 ///
121 /// @param[in] errorCode Error code (see david::ErrorCode).
122 ///
123 /// @return Textual description of error code.
124 ///
125 std::string GetDefaultErrorText(ErrorCode errorCode);
126 
127 
128 } // namespace
129 
130 #endif // DAVID_SDK_ERROR_CODES_H