fix exception management in call overload failed 39/16839/3
Antoine ELIAS [Fri, 10 Jul 2015 14:54:56 +0000 (16:54 +0200)]
Change-Id: Ic99c40ddde65abd7e8cf797b99b2a8b7982e9e15

scilab/modules/ast/src/cpp/ast/run_MatrixExp.hpp

index 8150b56..bee3bad 100644 (file)
@@ -393,7 +393,7 @@ void RunVisitorT<T>::visitprivate(const MatrixExp &e)
             setResult(Double::Empty());
         }
     }
-    catch (ast::ScilabError error)
+    catch (ast::ScilabError& error)
     {
         setResult(NULL);
         throw error;
@@ -432,7 +432,7 @@ types::InternalType* RunVisitorT<T>::callOverloadMatrixExp(std::wstring strType,
     catch (ast::ScilabMessage msg)
     {
         cleanInOut(in, out);
-        throw msg;
+        throw ScilabError(msg.GetErrorMessage(), msg.GetErrorNumber(), msg.GetErrorLocation());
     }
 
     if (Ret != Callable::OK)