From 97790524d8842a7af7fc1eac6033bfb825070eb8 Mon Sep 17 00:00:00 2001 From: "John P (Dgby714)" Date: Sat, 8 Jan 2011 05:53:17 -0500 Subject: [PATCH] Simba: small try .. except --- Projects/Simba/simbaunit.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Projects/Simba/simbaunit.pas b/Projects/Simba/simbaunit.pas index db27da9..0461ed1 100644 --- a/Projects/Simba/simbaunit.pas +++ b/Projects/Simba/simbaunit.pas @@ -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;