1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-28 20:12:16 -05:00

Simba: small try .. except

This commit is contained in:
John P (Dgby714) 2011-01-08 05:53:17 -05:00
parent 8a7573fedd
commit 97790524d8

View File

@ -1592,8 +1592,12 @@ begin
if FileExistsUTF8(SimbaForm.DefScriptPath) then if FileExistsUTF8(SimbaForm.DefScriptPath) then
begin begin
x := TStringList.Create; x := TStringList.Create;
try
x.LoadFromFile(SimbaForm.DefScriptPath); x.LoadFromFile(SimbaForm.DefScriptPath);
result := x.Text; except
mDebugLn('Couldn''t load default script file.');
end;
Result := x.Text;
end else end else
result := 'program new;'+LineEnding + 'begin'+LineEnding+'end.' + LineEnding; result := 'program new;'+LineEnding + 'begin'+LineEnding+'end.' + LineEnding;
end; end;