mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 09:12:19 -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:
parent
81c123fd41
commit
276620c8d4
@ -535,10 +535,15 @@ begin
|
|||||||
ScriptErrorLine:= -1;
|
ScriptErrorLine:= -1;
|
||||||
CurrentSyncInfo.SyncMethod:= @Self.SafeCallThread;
|
CurrentSyncInfo.SyncMethod:= @Self.SafeCallThread;
|
||||||
UseCPascal := LoadSettingDef('Settings/Interpreter/UseCPascal', 'True');
|
UseCPascal := LoadSettingDef('Settings/Interpreter/UseCPascal', 'True');
|
||||||
if lowercase(UseCPascal) = 'true' then
|
try
|
||||||
ScriptThread := TCPThread.Create(True,@CurrentSyncInfo,PluginsPath)
|
if lowercase(UseCPascal) = 'true' then
|
||||||
else
|
ScriptThread := TCPThread.Create(True,@CurrentSyncInfo,PluginsPath)
|
||||||
ScriptThread := TPSThread.Create(True,@CurrentSyncInfo,PluginsPath);
|
else
|
||||||
|
ScriptThread := TPSThread.Create(True,@CurrentSyncInfo,PluginsPath);
|
||||||
|
except
|
||||||
|
writeln('Failed to initialise the library!');
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
{$IFNDEF TERMINALWRITELN}
|
{$IFNDEF TERMINALWRITELN}
|
||||||
ScriptThread.SetDebug(@formWriteln);
|
ScriptThread.SetDebug(@formWriteln);
|
||||||
ScriptThread.DebugMemo := Self.Memo1;
|
ScriptThread.DebugMemo := Self.Memo1;
|
||||||
|
Loading…
Reference in New Issue
Block a user