ok. this is now my concept to handle errors:
procedure LogError(FunctionName: string; Error: Boolean);
var
Inverse: Boolean;
begin
Inverse := IsInBlackList(FunctionName); // list of non-fixed-bug-tests
if Error then
begin
if not Inverse then
log.Message('Error: '+FunctionName);
end
else begin
if Inverse then
log.Message('Error: '+FunctionName);
end;
end;
procedure Buggy;
const
FUNCTIONNAME = 'Buggy';
var
Error;
begin
// instead of: aqObject.CompareProperty(1, cmpEqual, 0, true, lmError);
Error := aqObject.CompareProperty(1, cmpEqual, 0, true, lmWarning);
LogError(FUNCTIONNAME, Error);
end;
is there a function that delivers me the name of the function self?
LogError( FunctionName(self) , Error);