10 #include <fsdk/Types/Result.h>
29 InvalidTransformation,
31 InvalidDescriptorBatch,
32 InvalidSettingsProvider,
35 InvalidSerializedObject,
48 IncompatibleDescriptors,
51 FiltredAggregationError,
54 UnsupportedFunctionality,
58 IncompatibleModelVersions,
61 LicenseIsNotActivated,
76 static bool isOk(
FSDKError error) noexcept {
80 static const char* toString (
FSDKError error) noexcept {
86 case FSDKError::InvalidRect:
return "Invalid rectangle";
87 case FSDKError::InvalidImageFormat:
return "Invalid image format";
88 case FSDKError::InvalidImageSize:
return "Invalid image size";
89 case FSDKError::InvalidDetection:
return "Invalid detection";
90 case FSDKError::InvalidLandmarks5:
return "Invalid landmarks 5";
91 case FSDKError::InvalidLandmarks68:
return "Invalid landmarks 68";
92 case FSDKError::InvalidTransformation:
return "Invalid transformation.";
93 case FSDKError::InvalidDescriptor:
return "Invalid descriptor";
94 case FSDKError::InvalidDescriptorBatch:
return "Invalid descriptor batch.";
95 case FSDKError::InvalidSettingsProvider:
return "Invalid settings provider..";
96 case FSDKError::InvalidDescriptorId:
return "Invalid descriptor id.";
98 case FSDKError::InvalidSerializedObject:
return "Invalid serialized object.";
99 case FSDKError::ModuleNotInitialized:
return "Module is not initialized";
100 case FSDKError::ModuleNotReady:
return "Module is not ready";
101 case FSDKError::LicenseError:
return "Licensing issue";
102 case FSDKError::BufferIsNull:
return "Buffer is null";
103 case FSDKError::BufferIsFull:
return "Buffer is full";
104 case FSDKError::BufferIsEmpty:
return "Buffer is empty";
105 case FSDKError::InvalidBufferSize:
return "Invalid buffer size";
106 case FSDKError::InvalidSpanSize:
return "Invalid span size";
107 case FSDKError::InvalidBatch:
return "Invalid Batch";
108 case FSDKError::IncompatibleDescriptors:
return "Descriptors are incompatible";
109 case FSDKError::EnableJustInBetaMode:
return "Attempt to create feature while betaMode is turned off";
110 case FSDKError::FiltredAggregationError:
return "Cant aggregate descriptors - all images'a GSs are less the threashold";
111 case FSDKError::BatchedInternalError:
return "Something gone wrong in batched query";
112 case FSDKError::UnsupportedFunctionality:
return "Was requested unsupported functionality";
113 case FSDKError::HighMemoryUsage:
return "Operation required a lot of memory";
114 case FSDKError::IncompatibleModelVersions:
return "Incompatible model versions";
115 case FSDKError::ModelNotLoaded:
return "Model not loaded";
116 case FSDKError::InvalidConfig:
return "Invalid config";
117 case FSDKError::LicenseIsNotActivated:
return "License is not activated!";
118 case FSDKError::FeatureNotAvailable:
return "Requested Feature not available.";
119 case FSDKError::FeatureExpired:
return "Feature is expired.";
120 case FSDKError::FingerprintError:
return "Failed to get device fingerprint.";
121 case FSDKError::ValidationFailed:
return "Failed validation.";
123 default:
return "Unknown error";