Error handling#
ItalaApi defines ItalaError
that define the error all the methods return. Once the error code have been stored in a varibale is possible to deeper analyze the error using ERR_GetLastErrorMessage
and ERR_GetLastErrorCode
.
ItalaError error = ItalaErrorSuccess;
error = /*Any ItalaApiC*/;
if(error != ItalaErrorSuccess){
size_t sizeMessage = 255;
char message[255];
ERR_GetLastErrorMessage(message, &sizeMessage);
printf("%zu - %s", error, message);
}