1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-26 03:02:15 -05:00

Catch the exception thrown if the Interpreters fail to initialise

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@496 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2010-01-28 18:22:45 +00:00
parent 81c123fd41
commit 276620c8d4

View File

@ -535,10 +535,15 @@ begin
ScriptErrorLine:= -1;
CurrentSyncInfo.SyncMethod:= @Self.SafeCallThread;
UseCPascal := LoadSettingDef('Settings/Interpreter/UseCPascal', 'True');
try
if lowercase(UseCPascal) = 'true' then
ScriptThread := TCPThread.Create(True,@CurrentSyncInfo,PluginsPath)
else
ScriptThread := TPSThread.Create(True,@CurrentSyncInfo,PluginsPath);
except
writeln('Failed to initialise the library!');
Exit;
end;
{$IFNDEF TERMINALWRITELN}
ScriptThread.SetDebug(@formWriteln);
ScriptThread.DebugMemo := Self.Memo1;