fix non handled exception if error occurs in scilab.start
[scilab.git] / scilab / modules / core / src / cpp / InitScilab.cpp
index dd9052c..75d81e2 100644 (file)
@@ -283,7 +283,11 @@ int StartScilabEngine(ScilabEngineInfo* _pSEI)
     //execute scilab.start
     if (_pSEI->iNoStart == 0)
     {
-        execScilabStartTask(_pSEI->iSerialize != 0);
+        int ierr = execScilabStartTask(_pSEI->iSerialize != 0);
+        if (ierr)
+        {
+            return ierr;
+        }
     }
 
     //open console scope
@@ -907,54 +911,54 @@ static void stateShow(Parser::ControlStatus status)
 {
     switch (status)
     {
-            //case Parser::WithinFor:
-            //    SetTemporaryPrompt("-for       ->");
-            //    break;
-            //case Parser::WithinWhile:
-            //    SetTemporaryPrompt("-while     ->");
-            //    break;
-            //case Parser::WithinIf:
-            //    SetTemporaryPrompt("-if        ->");
-            //    break;
-            //case Parser::WithinElse:
-            //    SetTemporaryPrompt("-else      ->");
-            //    break;
-            //case Parser::WithinElseIf:
-            //    SetTemporaryPrompt("-elseif    ->");
-            //    break;
-            //case Parser::WithinTry:
-            //    SetTemporaryPrompt("-try       ->");
-            //    break;
-            //case Parser::WithinCatch:
-            //    SetTemporaryPrompt("-catch     ->");
-            //    break;
-            //case Parser::WithinFunction:
-            //    SetTemporaryPrompt("-function  ->");
-            //    break;
-            //case Parser::WithinSelect:
-            //    SetTemporaryPrompt("-select    ->");
-            //    break;
-            //case Parser::WithinCase:
-            //    SetTemporaryPrompt("-case      ->");
-            //    break;
-            //case Parser::WithinSwitch:
-            //    SetTemporaryPrompt("-switch    ->");
-            //    break;
-            //case Parser::WithinOtherwise:
-            //    SetTemporaryPrompt("-otherwise ->");
-            //    break;
-            //case Parser::WithinMatrix:
-            //    SetTemporaryPrompt("- [        ->");
-            //    break;
-            //case Parser::WithinCell:
-            //    SetTemporaryPrompt("- {        ->");
-            //    break;
-            //case Parser::WithinBlockComment:
-            //    SetTemporaryPrompt("- /*       ->");
-            //    break;
-            //case Parser::WithinDots:
-            //    SetTemporaryPrompt("- ...      ->");
-            //    break;
+        //case Parser::WithinFor:
+        //    SetTemporaryPrompt("-for       ->");
+        //    break;
+        //case Parser::WithinWhile:
+        //    SetTemporaryPrompt("-while     ->");
+        //    break;
+        //case Parser::WithinIf:
+        //    SetTemporaryPrompt("-if        ->");
+        //    break;
+        //case Parser::WithinElse:
+        //    SetTemporaryPrompt("-else      ->");
+        //    break;
+        //case Parser::WithinElseIf:
+        //    SetTemporaryPrompt("-elseif    ->");
+        //    break;
+        //case Parser::WithinTry:
+        //    SetTemporaryPrompt("-try       ->");
+        //    break;
+        //case Parser::WithinCatch:
+        //    SetTemporaryPrompt("-catch     ->");
+        //    break;
+        //case Parser::WithinFunction:
+        //    SetTemporaryPrompt("-function  ->");
+        //    break;
+        //case Parser::WithinSelect:
+        //    SetTemporaryPrompt("-select    ->");
+        //    break;
+        //case Parser::WithinCase:
+        //    SetTemporaryPrompt("-case      ->");
+        //    break;
+        //case Parser::WithinSwitch:
+        //    SetTemporaryPrompt("-switch    ->");
+        //    break;
+        //case Parser::WithinOtherwise:
+        //    SetTemporaryPrompt("-otherwise ->");
+        //    break;
+        //case Parser::WithinMatrix:
+        //    SetTemporaryPrompt("- [        ->");
+        //    break;
+        //case Parser::WithinCell:
+        //    SetTemporaryPrompt("- {        ->");
+        //    break;
+        //case Parser::WithinBlockComment:
+        //    SetTemporaryPrompt("- /*       ->");
+        //    break;
+        //case Parser::WithinDots:
+        //    SetTemporaryPrompt("- ...      ->");
+        //    break;
         default :
             SetTemporaryPrompt("  > ");
             break;