mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-23 07:48:50 -05:00
Simba: small try .. except
This commit is contained in:
parent
8a7573fedd
commit
97790524d8
@ -1592,8 +1592,12 @@ begin
|
||||
if FileExistsUTF8(SimbaForm.DefScriptPath) then
|
||||
begin
|
||||
x := TStringList.Create;
|
||||
x.LoadFromFile(SimbaForm.DefScriptPath);
|
||||
result := x.Text;
|
||||
try
|
||||
x.LoadFromFile(SimbaForm.DefScriptPath);
|
||||
except
|
||||
mDebugLn('Couldn''t load default script file.');
|
||||
end;
|
||||
Result := x.Text;
|
||||
end else
|
||||
result := 'program new;'+LineEnding + 'begin'+LineEnding+'end.' + LineEnding;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user