Closed HuguesDug closed 1 year ago
Create your
function cvDelphiErrorHandler( //
status: Integer; //
const func_name: PCvChar; //
const err_msg: PCvChar; //
const file_name: PCvChar; //
line: Integer; //
user_data: pointer //
): Integer; cdecl;
begin
cvSetErrStatus(0);
// Ignore
// reset error status avoiding a cascade of subsequent errors
Result := 0;
// Or
// Raise Exception
Raise Exception.CreateFmt('OpenCV error: in file <<%s>> function <<%s>> line <<%d>> - %s', //
[string(file_name), string(func_name), line, String(err_msg)]);
end;
and set handler
cvRedirectError(cvDelphiErrorHandler);
Hello,
In the previous versions of the lib, was existing the very helpful cvDelphiErrorHandler.
It was in ocv.utils.
No longer there. I can't find it in another unit. Any help ?