IDLive Face C++ API 1.46.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
facesdk::FaceException Class Reference

Custom runtime exception for FaceSDK methods. More...

#include <facesdk/FaceException.h>

Inheritance diagram for facesdk::FaceException:

Public Types

enum  STATUS {
  FACE_TOO_CLOSE , FACE_CLOSE_TO_BORDER , FACE_CROPPED , FACE_NOT_FOUND ,
  TOO_MANY_FACES , FACE_TOO_SMALL , FACE_ANGLE_TOO_LARGE , FAILED_TO_READ_IMAGE ,
  FAILED_TO_WRITE_IMAGE , FAILED_TO_READ_MODEL , FAILED_TO_BUILD_INTERPRETER , FAILED_TO_INVOKE_INTERPRETER ,
  FAILED_TO_ALLOCATE , INVALID_CONFIG , NO_SUCH_OBJECT_IN_BUILD , FAILED_TO_PREPROCESS_IMAGE_WHILE_PREDICT ,
  FAILED_TO_PREPROCESS_IMAGE_WHILE_DETECT , FAILED_TO_PREDICT_LANDMARKS , INVALID_FUSE_MODE , NULLPTR ,
  LICENSE_ERROR , INVALID_META , UNKNOWN , OK ,
  FACE_IS_OCCLUDED , FAILED_TO_FETCH_COREML_DECRYPTION_KEY , EYES_CLOSED
}
 Error code. More...
 

Public Member Functions

 FaceException (std::string message_, STATUS code_)
 FaceException constructor.
 
const char * what () const noexcept override
 Get error message as C-string.
 
STATUS status () const
 Get error code.
 

Friends

std::ostream & operator<< (std::ostream &os, const STATUS &status)
 
std::ostream & operator<< (std::ostream &os, const FaceException &exception)
 

Detailed Description

Custom runtime exception for FaceSDK methods.

Member Enumeration Documentation

◆ STATUS

Error code.

Enumerator
FACE_TOO_CLOSE 

A distance between face and image border is too small for preprocessing issues.

FACE_CLOSE_TO_BORDER 

Face is too close to one or more borders. May reduce the accuracy of spoofing detection because edges of face may not be seen.

FACE_CROPPED 

Face is cropped. May reduce the accuracy of spoofing detection because edges of face may not be seen.

FACE_NOT_FOUND 

Face detector can't find face on image.

TOO_MANY_FACES 

Face detector found more than one face on image.

FACE_TOO_SMALL 

Facial area is not big enough for analysis.

FACE_ANGLE_TOO_LARGE 

Facial out-of-plane rotation angle is extremely large.

FAILED_TO_READ_IMAGE 

File decoding error.

FAILED_TO_WRITE_IMAGE 

File encoding error.

FAILED_TO_READ_MODEL 

Model deserializing error.

FAILED_TO_BUILD_INTERPRETER 

tflite::Interpreter building error.

FAILED_TO_INVOKE_INTERPRETER 

tflite::Interpreter invoking error.

FAILED_TO_ALLOCATE 

Memory allocation error.

INVALID_CONFIG 

Config deserializing error.

NO_SUCH_OBJECT_IN_BUILD 

Engine or backend is not supported by the build.

FAILED_TO_PREPROCESS_IMAGE_WHILE_PREDICT 

Liveness prediction error.

FAILED_TO_PREPROCESS_IMAGE_WHILE_DETECT 

Face detection error.

FAILED_TO_PREDICT_LANDMARKS 

Landmarks prediction error.

INVALID_FUSE_MODE 

Invalid fuse mode provided.

NULLPTR 

Nullptr provided.

LICENSE_ERROR 

Some error occurred during license checking.

INVALID_META 

Invalid facesdk::Meta value provided.

UNKNOWN 

Unhandled exception in the code.

OK 

No errors.

FACE_IS_OCCLUDED 

The biggest face on the input image is occluded, so liveness check is not possible.

FAILED_TO_FETCH_COREML_DECRYPTION_KEY 

Failed to fetch CoreML model decryption key from Apple serve.rs.

EYES_CLOSED 

Eyes are closed.

Constructor & Destructor Documentation

◆ FaceException()

facesdk::FaceException::FaceException ( std::string  message_,
STATUS  code_ 
)
inline

FaceException constructor.

Parameters
message_Error message
code_Error code

Member Function Documentation

◆ status()

STATUS facesdk::FaceException::status ( ) const
inline

Get error code.

Returns
Error code from STATUS enum

◆ what()

const char * facesdk::FaceException::what ( ) const
inlineoverridenoexcept

Get error message as C-string.

Returns
Error message in C-string format