Error Handling
#
C++In case of an error, the libfacerec library throws the pbio::Error
exception, so the return values are always correct and no additional check is required. The pbio::Error
class is derived from the std::exception
. Its member function pbio::Error::what
returns a null-terminated character sequence identifying the exception. Its member function pbio::Error::code
returns an unsigned integer code of an exception.
Example:
#
JavaIn case of an error, an exception is thrown from the com.vdt.face_recognition.sdk.SDKException
class derived from the java.lang.RuntimeException
base class. Its method com.vdt.face_recognition.sdk.SDKException.getMessage()
returns a string with an error description, and the com.vdt.face_recognition.sdk.SDKException.code()
method returns an unsigned integer code of exception.
Example:
#
C#In case of an error, an exception is thrown from the VDT.FaceRecognition.SDK.Error
class derived from the VDT.FaceRecognition.SDK.Exception
class. Its property VDT.FaceRecognition.SDK.Error.Message
returns a string with an error description, and the VDT.FaceRecognition.SDK.Error.Code
method returns an unsigned integer code of exception.
Example:
#
PythonIn case of an error, the Error
exception (derived from the Exception
class) is thrown. Its property Error.message
returns a string with an error description, and the Error.code
method returns an hex code of exception.
Example: