diff --git a/Doc/Manual/Scilab.html b/Doc/Manual/Scilab.html index fea6028ea..32e405e37 100644 --- a/Doc/Manual/Scilab.html +++ b/Doc/Manual/Scilab.html @@ -1256,31 +1256,36 @@ It can be used with the lasterror() function as following:

-If the function has a throw exception speficication, SWIG can map automatically the exception type and set an appropriate Scilab error message. -It works for exception basic types, like char* in the previous example or another example, int: +If the function has a throw exception specification, SWIG can map automatically the exception type and set an appropriate Scilab error message. +It works for exception basic types, and if the the library std_except.i is used, also for STL exceptions:

 %module example
 
+%include <std_except.i>
+
 %inline %{
 void throw_int() throw(int) {
   throw 12;
 }
+
+void throw_stl_invalid_arg(int i) throw(std::invalid_argument) {
+  if (i < 0)
+    throw std::invalid_argument("argument is negative.");
+}
 %}
 

--->execstr('throw_int()', 'errcatch');
- ans  =
+-->throw_int();
+            !--error 999
+SWIG/Scilab: Exception (int) occured: 12
 
-    999.
-
--->lasterror()
- ans  =
-
-  Exception (int) occured: 12.
+-->throw_stl_invalid_arg(-1);
+                          !--error 999
+SWIG/Scilab: ValueError: argument is negative.