Face Engine SDK  5.17.0
A face detection, recognition and tracking engine.
include/fsdk/FSDKError.h
Go to the documentation of this file.
00001 
00008 #pragma once
00009 
00010 #include <fsdk/Types/Result.h>
00011 
00012 namespace fsdk {
00013 
00017     enum class FSDKError : uint32_t {
00018         Ok,           
00019         Internal,     
00020         InvalidInput, 
00021         InvalidImage, 
00022 
00023         InvalidRect,             
00024         InvalidImageFormat,      
00025         InvalidImageSize,        
00026         InvalidDetection,        
00027         InvalidLandmarks5,       
00028         InvalidLandmarks68,      
00029         InvalidTransformation,   
00030         InvalidDescriptor,       
00031         InvalidDescriptorBatch,  
00032         InvalidSettingsProvider, 
00033         InvalidDescriptorId,     
00034         InvalidPath,             
00035         InvalidSerializedObject, 
00036 
00037         ModuleNotInitialized, 
00038         ModuleNotReady,       
00039         LicenseError,         
00040 
00041         BufferIsNull,      
00042         BufferIsFull,      
00043         BufferIsEmpty,     
00044         InvalidBufferSize, 
00045         InvalidSpanSize,   
00046         InvalidBatch,      
00047 
00048         IncompatibleDescriptors, 
00049         EnableJustInBetaMode,    
00050 
00051         FiltredAggregationError, 
00052 
00053         BatchedInternalError, 
00054 
00055         UnsupportedFunctionality, // !< was requested unsupported functionality for this type of descroptor or for
00056                                                             // this model version
00057 
00058         HighMemoryUsage, // !< Operation required a lot of memory. Batch size if too big for example.
00059 
00060         IncompatibleModelVersions, 
00061         ModelNotLoaded,            
00062         InvalidConfig,             
00063         LicenseIsNotActivated,     
00064         FeatureNotAvailable,       
00065         FeatureExpired,            
00066         FingerprintError,          
00067         ValidationFailed,          
00068         CudaError,                 
00069 
00070         NotImplemented, 
00071     };
00072 
00076     template <>
00077     struct ErrorTraits<FSDKError> {
00078 
00079         static bool isOk(FSDKError error) noexcept {
00080             return error == FSDKError::Ok;
00081         }
00082 
00083         static const char* toString(FSDKError error) noexcept {
00084             switch(error) {
00085             case FSDKError::Ok:
00086                 return "Ok";
00087             case FSDKError::Internal:
00088                 return "Internal error";
00089             case FSDKError::InvalidInput:
00090                 return "Invalid input";
00091             case FSDKError::InvalidImage:
00092                 return "Invalid image";
00093             case FSDKError::InvalidRect:
00094                 return "Invalid rectangle";
00095             case FSDKError::InvalidImageFormat:
00096                 return "Invalid image format";
00097             case FSDKError::InvalidImageSize:
00098                 return "Invalid image size";
00099             case FSDKError::InvalidDetection:
00100                 return "Invalid detection";
00101             case FSDKError::InvalidLandmarks5:
00102                 return "Invalid landmarks 5";
00103             case FSDKError::InvalidLandmarks68:
00104                 return "Invalid landmarks 68";
00105             case FSDKError::InvalidTransformation:
00106                 return "Invalid transformation.";
00107             case FSDKError::InvalidDescriptor:
00108                 return "Invalid descriptor";
00109             case FSDKError::InvalidDescriptorBatch:
00110                 return "Invalid descriptor batch.";
00111             case FSDKError::InvalidSettingsProvider:
00112                 return "Invalid settings provider..";
00113             case FSDKError::InvalidDescriptorId:
00114                 return "Invalid descriptor id.";
00115             case FSDKError::InvalidPath:
00116                 return "Invalid path.";
00117             case FSDKError::InvalidSerializedObject:
00118                 return "Invalid serialized object.";
00119             case FSDKError::ModuleNotInitialized:
00120                 return "Module is not initialized";
00121             case FSDKError::ModuleNotReady:
00122                 return "Module is not ready";
00123             case FSDKError::LicenseError:
00124                 return "Licensing issue";
00125             case FSDKError::BufferIsNull:
00126                 return "Buffer is null";
00127             case FSDKError::BufferIsFull:
00128                 return "Buffer is full";
00129             case FSDKError::BufferIsEmpty:
00130                 return "Buffer is empty";
00131             case FSDKError::InvalidBufferSize:
00132                 return "Invalid buffer size";
00133             case FSDKError::InvalidSpanSize:
00134                 return "Invalid span size";
00135             case FSDKError::InvalidBatch:
00136                 return "Invalid Batch";
00137             case FSDKError::IncompatibleDescriptors:
00138                 return "Descriptors are incompatible";
00139             case FSDKError::EnableJustInBetaMode:
00140                 return "Attempt to create feature while betaMode is turned off";
00141             case FSDKError::FiltredAggregationError:
00142                 return "Cant aggregate descriptors - all images'a GSs are less the threashold";
00143             case FSDKError::BatchedInternalError:
00144                 return "Something gone wrong in batched query";
00145             case FSDKError::UnsupportedFunctionality:
00146                 return "Was requested unsupported functionality";
00147             case FSDKError::HighMemoryUsage:
00148                 return "Operation required a lot of memory";
00149             case FSDKError::IncompatibleModelVersions:
00150                 return "Incompatible model versions";
00151             case FSDKError::ModelNotLoaded:
00152                 return "Model not loaded";
00153             case FSDKError::InvalidConfig:
00154                 return "Invalid config";
00155             case FSDKError::LicenseIsNotActivated:
00156                 return "License is not activated!";
00157             case FSDKError::FeatureNotAvailable:
00158                 return "Requested Feature not available.";
00159             case FSDKError::FeatureExpired:
00160                 return "Feature is expired.";
00161             case FSDKError::FingerprintError:
00162                 return "Failed to get device fingerprint.";
00163             case FSDKError::ValidationFailed:
00164                 return "Failed validation.";
00165             case FSDKError::CudaError:
00166                 return "CUDA Error";
00167             case FSDKError::NotImplemented:
00168                 return "Not implemented.";
00169             default:
00170                 return "Unknown error";
00171             }
00172         }
00173     };
00174 
00175 } // namespace fsdk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines