Allows to run code like this: C:\Projects\Win32\Debug>set dmvc.server.port = 9999 & Project6.exe

This commit is contained in:
Daniele Teti 2023-09-22 09:41:37 +02:00
parent f52c973e44
commit ed9a0cbe0e

View File

@ -316,9 +316,9 @@ begin
end
else
begin
if not TryStrToInt(lTmp, Result) then
if not TryStrToInt(lTmp.Trim, Result) then
begin
raise EMVCDotEnv.CreateFmt('Env "%s" is not a valid integer', [Name]);
raise EMVCDotEnv.CreateFmt('Env "%s" is not a valid integer [Current Value: "%s"]', [Name, lTmp]);
end;
end;
end;
@ -335,9 +335,9 @@ begin
end
else
begin
if not TryStrToBool(lTmp, Result) then
if not TryStrToBool(lTmp.Trim, Result) then
begin
raise EMVCDotEnv.CreateFmt('Env "%s" is not a valid boolean', [Name]);
raise EMVCDotEnv.CreateFmt('Env "%s" is not a valid boolean [Current Value: "%s"]', [Name, lTmp]);
end;
end;
end;