| Face Engine SDK 5.2.0 A face detection, recognition and tracking engine.

FSDKError.h
Go to the documentation of this file.
1
8 #pragma once
9
10 #include <fsdk/Types/Result.h>
11
12 namespace fsdk {
13
17 enum class FSDKError : uint32_t {
18 Ok,
19 Internal,
20 InvalidInput,
21 InvalidImage,
22
23 InvalidRect,
24 InvalidImageFormat,
25 InvalidImageSize,
26 InvalidDetection,
27 InvalidLandmarks5,
28 InvalidLandmarks68,
29 InvalidTransformation,
30 InvalidDescriptor,
31 InvalidDescriptorBatch,
32 InvalidSettingsProvider,
33 InvalidDescriptorId,
34 InvalidPath,
35 InvalidSerializedObject,
36
37 ModuleNotInitialized,
38 ModuleNotReady,
39 LicenseError,
40
41 BufferIsNull,
42 BufferIsFull,
43 BufferIsEmpty,
44 InvalidBufferSize,
45 InvalidSpanSize,
46 InvalidBatch,
47
48 IncompatibleDescriptors,
49 EnableJustInBetaMode,
50
51 FiltredAggregationError,
52
53 BatchedInternalError,
54 UnsupportedFunctionality, // !< was requested unsupported functionality for this type of descroptor or for this model version
55
56 HighMemoryUsage, // !< Operation required a lot of memory. Batch size if too big for example.
57
58 IncompatibleModelVersions,
59 ModelNotLoaded,
60 InvalidConfig,
61 LicenseIsNotActivated,
62 FeatureNotAvailable,
63 FeatureExpired,
64 FingerprintError,
65 ValidationFailed
66 };
67
71 template<>
72 struct ErrorTraits<FSDKError> {
73
74 static bool isOk(FSDKError error) noexcept {
75 return error == FSDKError::Ok;
76 }
77
78 static const char* toString (FSDKError error) noexcept {
79 switch(error) {
80 case FSDKError::Ok: return "Ok";
81 case FSDKError::Internal: return "Internal error";
82 case FSDKError::InvalidInput: return "Invalid input";
83 case FSDKError::InvalidImage: return "Invalid image";
84 case FSDKError::InvalidRect: return "Invalid rectangle";
85 case FSDKError::InvalidImageFormat: return "Invalid image format";
86 case FSDKError::InvalidImageSize: return "Invalid image size";
87 case FSDKError::InvalidDetection: return "Invalid detection";
88 case FSDKError::InvalidLandmarks5: return "Invalid landmarks 5";
89 case FSDKError::InvalidLandmarks68: return "Invalid landmarks 68";
90 case FSDKError::InvalidTransformation: return "Invalid transformation.";
91 case FSDKError::InvalidDescriptor: return "Invalid descriptor";
92 case FSDKError::InvalidDescriptorBatch: return "Invalid descriptor batch.";
93 case FSDKError::InvalidSettingsProvider: return "Invalid settings provider..";
94 case FSDKError::InvalidDescriptorId: return "Invalid descriptor id.";
95 case FSDKError::InvalidPath: return "Invalid path.";
96 case FSDKError::InvalidSerializedObject: return "Invalid serialized object.";
97 case FSDKError::ModuleNotInitialized: return "Module is not initialized";
98 case FSDKError::ModuleNotReady: return "Module is not ready";
99 case FSDKError::LicenseError: return "Licensing issue";
100 case FSDKError::BufferIsNull: return "Buffer is null";
101 case FSDKError::BufferIsFull: return "Buffer is full";
102 case FSDKError::BufferIsEmpty: return "Buffer is empty";
103 case FSDKError::InvalidBufferSize: return "Invalid buffer size";
104 case FSDKError::InvalidSpanSize: return "Invalid span size";
105 case FSDKError::InvalidBatch: return "Invalid Batch";
106 case FSDKError::IncompatibleDescriptors: return "Descriptors are incompatible";
107 case FSDKError::EnableJustInBetaMode: return "Attempt to create feature while betaMode is turned off";
108 case FSDKError::FiltredAggregationError: return "Cant aggregate descriptors - all images'a GSs are less the threashold";
109 case FSDKError::BatchedInternalError: return "Something gone wrong in batched query";
110 case FSDKError::UnsupportedFunctionality: return "Was requested unsupported functionality";
111 case FSDKError::HighMemoryUsage: return "Operation required a lot of memory";
112 case FSDKError::IncompatibleModelVersions: return "Incompatible model versions";
113 case FSDKError::ModelNotLoaded: return "Model not loaded";
114 case FSDKError::InvalidConfig: return "Invalid config";
115 case FSDKError::LicenseIsNotActivated: return "License is not activated!";
116 case FSDKError::FeatureNotAvailable: return "Requested Feature not available.";
117 case FSDKError::FeatureExpired: return "Feature is expired.";
118 case FSDKError::FingerprintError: return "Failed to get device fingerprint.";
119 case FSDKError::ValidationFailed: return "Failed validation.";
120 default: return "Unknown error";
121 }
122 }
123 };
124
125 }
fsdk::FSDKError::InvalidInput
@ InvalidInput
Invalid input.
fsdk::FSDKError
FSDKError
Common SDK error codes.
Definition: FSDKError.h:17
fsdk::FSDKError::Internal
@ Internal
Internal error.
fsdk::FSDKError::InvalidPath
@ InvalidPath
Invalid path to object.
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::FSDKError::Ok
@ Ok
Ok.
fsdk::ErrorTraits
Definition: Result.h:10
fsdk::FSDKError::InvalidImage
@ InvalidImage
Invalid image.