From bf0f806ecfe0abec8d43103dc87c366ca54c96c0 Mon Sep 17 00:00:00 2001 From: Niels Date: Wed, 3 Aug 2011 21:06:56 +0200 Subject: [PATCH] Added debug message for when initializing the interpreter fails. --- Projects/Simba/simbaunit.pas | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Projects/Simba/simbaunit.pas b/Projects/Simba/simbaunit.pas index ccd0a11..6e2b2fe 100644 --- a/Projects/Simba/simbaunit.pas +++ b/Projects/Simba/simbaunit.pas @@ -1652,8 +1652,12 @@ begin raise Exception.CreateFmt('Unknown Interpreter %d!', [Interpreter]); end; except - mDebugLn('Failed to initialise the interpreter'); - Exit; + on E: Exception do + begin + mDebugLn('Failed to initialise the interpreter: ' + E.Message); + Thread := nil; + Exit; + end; end; {$IFNDEF TERMINALWRITELN} @@ -2379,6 +2383,9 @@ begin end; end; SimbaForm.InitializeTMThread(t); + if (t = nil) then + Exit; + KillThread(t.ThreadID); { XXX: Why do we kill the thread again ? } if (t is TPSThread) then try