10 #include <fsdk/Types/Result.h>
29 InvalidTransformation,
31 InvalidDescriptorBatch,
32 InvalidSettingsProvider,
35 InvalidSerializedObject,
48 IncompatibleDescriptors,
51 FiltredAggregationError,
54 UnsupportedFunctionality,
60 IncompatibleModelVersions,
63 LicenseIsNotActivated,
79 static bool isOk(
FSDKError error) noexcept {
83 static const char* toString(
FSDKError error) noexcept {
88 return "Internal error";
90 return "Invalid input";
92 return "Invalid image";
93 case FSDKError::InvalidRect:
94 return "Invalid rectangle";
95 case FSDKError::InvalidImageFormat:
96 return "Invalid image format";
97 case FSDKError::InvalidImageSize:
98 return "Invalid image size";
99 case FSDKError::InvalidDetection:
100 return "Invalid detection";
101 case FSDKError::InvalidLandmarks5:
102 return "Invalid landmarks 5";
103 case FSDKError::InvalidLandmarks68:
104 return "Invalid landmarks 68";
105 case FSDKError::InvalidTransformation:
106 return "Invalid transformation.";
107 case FSDKError::InvalidDescriptor:
108 return "Invalid descriptor";
109 case FSDKError::InvalidDescriptorBatch:
110 return "Invalid descriptor batch.";
111 case FSDKError::InvalidSettingsProvider:
112 return "Invalid settings provider..";
113 case FSDKError::InvalidDescriptorId:
114 return "Invalid descriptor id.";
116 return "Invalid path.";
117 case FSDKError::InvalidSerializedObject:
118 return "Invalid serialized object.";
119 case FSDKError::ModuleNotInitialized:
120 return "Module is not initialized";
121 case FSDKError::ModuleNotReady:
122 return "Module is not ready";
123 case FSDKError::LicenseError:
124 return "Licensing issue";
125 case FSDKError::BufferIsNull:
126 return "Buffer is null";
127 case FSDKError::BufferIsFull:
128 return "Buffer is full";
129 case FSDKError::BufferIsEmpty:
130 return "Buffer is empty";
131 case FSDKError::InvalidBufferSize:
132 return "Invalid buffer size";
133 case FSDKError::InvalidSpanSize:
134 return "Invalid span size";
135 case FSDKError::InvalidBatch:
136 return "Invalid Batch";
137 case FSDKError::IncompatibleDescriptors:
138 return "Descriptors are incompatible";
139 case FSDKError::EnableJustInBetaMode:
140 return "Attempt to create feature while betaMode is turned off";
141 case FSDKError::FiltredAggregationError:
142 return "Cant aggregate descriptors - all images'a GSs are less the threashold";
143 case FSDKError::BatchedInternalError:
144 return "Something gone wrong in batched query";
145 case FSDKError::UnsupportedFunctionality:
146 return "Was requested unsupported functionality";
147 case FSDKError::HighMemoryUsage:
148 return "Operation required a lot of memory";
149 case FSDKError::IncompatibleModelVersions:
150 return "Incompatible model versions";
151 case FSDKError::ModelNotLoaded:
152 return "Model not loaded";
153 case FSDKError::InvalidConfig:
154 return "Invalid config";
155 case FSDKError::LicenseIsNotActivated:
156 return "License is not activated!";
157 case FSDKError::FeatureNotAvailable:
158 return "Requested Feature not available.";
159 case FSDKError::FeatureExpired:
160 return "Feature is expired.";
161 case FSDKError::FingerprintError:
162 return "Failed to get device fingerprint.";
163 case FSDKError::ValidationFailed:
164 return "Failed validation.";
165 case FSDKError::CudaError:
168 return "Not implemented.";
170 return "Unknown error";