Subversion Repositories currency_converter

Compare Revisions

Regard whitespace Rev 18 → Rev 19

/trunk/RTL/VtsCurConv.pas
425,7 → 425,6
S_JSON_UNKNOWN_ERROR = 'Unknown error while loading JSON.';
S_API_KEY_INVALID = 'API key invalid.';
begin
try
{$REGION 'Determinate if we need to download or not'}
if HistoricDate = 0 then
begin
497,7 → 496,7
 
xRoot := TlkJSON.ParseText(sJSON) as TlkJSONobject;
if not assigned(xRoot) then raise EVtsCurConvException.Create(S_JSON_FILE_INVALID);
 
try
xSuccess := xRoot.Field['success'] as TlkJSONboolean;
if not assigned(xSuccess) then raise EVtsCurConvException.Create(S_UNKNOWN_SUCCESS);
 
541,14 → 540,14
end;
end;
end;
finally
FreeAndNil(xRoot);
end;
until not doRetry;
{$ENDREGION}
end;
 
result := sJSON;
finally
FreeAndNil(xRoot);
end;
end;
 
end.