call stack error and try catch fixed 75/16875/2
Cedric Delamarre [Wed, 22 Jul 2015 11:59:59 +0000 (13:59 +0200)]
function toto()
test()
endfunction

function test()
a=1;
a(3)
end

try
toto()
catch
disp("error catched")
end

// call stack must not be displayed
cos()

Change-Id: I330481494c605b9102b370e9851156742f5daa28

scilab/modules/ast/includes/ast/runvisitor.hxx

index 26bfa8d..7210fc2 100644 (file)
@@ -480,6 +480,8 @@ public :
             ConfigVariable::setSilentError(oldVal);
             //to lock lasterror
             ConfigVariable::setLastErrorCall();
+            // reset call stack filled when error occured
+            ConfigVariable::resetWhereError();
             e.getCatch().accept(*this);
         }
     }