Subversion Repositories currency_converter

Compare Revisions

Regard whitespace Rev 19 → Rev 18

/trunk/RTL/VtsCurConv.pas
425,6 → 425,7
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
496,7 → 497,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);
 
540,14 → 541,14
end;
end;
end;
finally
FreeAndNil(xRoot);
end;
until not doRetry;
{$ENDREGION}
end;
 
result := sJSON;
finally
FreeAndNil(xRoot);
end;
end;
 
end.