Error Handling

When an error occurs within the SDK, a FingerException exception is thrown. Generally you should wrap all invocations of the API into a try-catch block.

try:
    # ...
except id3finger.FingerException as ex:
    print(f"SDK exception: {ex}")
try
{
   // ...
}
on FingerException catch (e) {
    print('Finger SDK exception: $e');
}
try
{
   // ...
}
catch (FingerException ex)
{
    Console.WriteLine(ex.Message);
}
try {
    // ...
}
catch (FingerException ex) {
}
do {
    // ...
} catch let error as FingerException {
    print(error.message)
}

In C and C++ languages, you have to handle the errors manually. The possible error codes are listed in the FingerError, ImageError and LicenseError enumerations.

An example is given below:

int err = id3FingerLicense_CheckLicense(path, nullptr);
if (err != id3FingerError_Success) {
  // handle error here.
}

See also