Index: trunk/FACT++/src/InterpreterV8.cc
===================================================================
--- trunk/FACT++/src/InterpreterV8.cc	(revision 15139)
+++ trunk/FACT++/src/InterpreterV8.cc	(revision 15140)
@@ -697,7 +697,16 @@
         const bool rc = ExecuteFile(*file);
         if (exception.HasCaught())
+        {
+            // If this is called from the main thread, re-throw
+            if (fThreadId==V8::GetCurrentThreadId())
+                return exception.ReThrow();
+
+            // Otherwise, handle the exception...
             HandleException(exception, "include");
+        }
         if (!rc)
         {
+            // ...and stop the thread immediately (if this is not done,
+            // the other threads might still proceed);
             V8::TerminateExecution(fThreadId);
             return ThrowException(Null());
@@ -1990,5 +1999,5 @@
     if (exception.HasCaught())
     {
-        if (file=="internal")
+        if (file=="internal" || (fThreadId==V8::GetCurrentThreadId() && !main))
             return exception.ReThrow();
 
