Face Engine SDK  5.21.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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,
34  InvalidPath,
36 
39  LicenseError,
40 
41  BufferIsNull,
42  BufferIsFull,
46  InvalidBatch,
47 
50 
52 
54  UnsupportedFunctionality, // !< was requested unsupported functionality for this type of descroptor or for
56  // this model version
57 
58  HighMemoryUsage, // !< Operation required a lot of memory. Batch size if too big for example.
59 
68  CudaError,
69 
71  };
72 
76  template <>
78 
79  static bool isOk(FSDKError error) noexcept {
80  return error == FSDKError::Ok;
81  }
82 
83  static const char* toString(FSDKError error) noexcept {
84  switch(error) {
85  case FSDKError::Ok:
86  return "Ok";
88  return "Internal error";
90  return "Invalid input";
92  return "Invalid image";
94  return "Invalid rectangle";
96  return "Invalid image format";
98  return "Invalid image size";
100  return "Invalid detection";
102  return "Invalid landmarks 5";
104  return "Invalid landmarks 68";
106  return "Invalid transformation.";
108  return "Invalid descriptor";
110  return "Invalid descriptor batch.";
112  return "Invalid settings provider..";
114  return "Invalid descriptor id.";
116  return "Invalid path.";
118  return "Invalid serialized object.";
120  return "Module is not initialized";
122  return "Module is not ready";
124  return "Licensing issue";
126  return "Buffer is null";
128  return "Buffer is full";
130  return "Buffer is empty";
132  return "Invalid buffer size";
134  return "Invalid span size";
136  return "Invalid Batch";
138  return "Descriptors are incompatible";
140  return "Attempt to create feature while betaMode is turned off";
142  return "Cant aggregate descriptors - all images'a GSs are less the threashold";
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";
150  return "Incompatible model versions";
152  return "Model not loaded";
154  return "Invalid config";
156  return "License is not activated!";
158  return "Requested Feature not available.";
160  return "Feature is expired.";
162  return "Failed to get device fingerprint.";
164  return "Failed validation.";
166  return "CUDA Error";
168  return "Not implemented.";
169  default:
170  return "Unknown error";
171  }
172  }
173  };
174 
175 } // namespace fsdk
Invalid serialized object.
Cant aggregate descriptors - all images&#39;a GSs are less the threashold.
Matching attempt with incompatible descriptors.
Not implemented error.
Invalid descriptor batch.
Invalid settings provider.
Module is not ready.
Invalid path to object.
Definition: Result.h:8
Requested Feature not available.
License is not activated.
Licensing issue (expired license or unavailable feature).
Incompatible model versions.
Module is not initialized.
FSDKError
Common SDK error codes.
Definition: FSDKError.h:17
Invalid rectangle.
Attempt to create feature while betaMode is turned off.
Failed to get device fingerprint.