Happened with this code:
function DirectionToInt(const ADirection: TFileDirection): Integer;
procedure RaiseUnknowDirection; {$IF CompilerVersion >= 37.0} noreturn; {$ENDIF}
begin
raise Exception.Create('Unknown direction') at ReturnAddress;
end;
begin
{$IF DEFINED(FIXINSIGHT)}
Result := DIRECTION_NONE;
{$ENDIF}
case ADirection of
mgfdNone: Result := DIRECTION_NONE;
mgfdUpload: Result := DIRECTION_UPLOAD;
mgfdDownload: Result := DIRECTION_DOWNLOAD;
else
RaiseUnknowDirection;
end;
end;
And could not handle this define
{$IF (CompilerVersion < 37.0) OR DEFINED(FIXINSIGHT)}
Result := DIRECTION_NONE;
{$ENDIF}
Tommi Prami