diff --git a/doc/tutorial/doc/html/index.html b/doc/tutorial/doc/html/index.html index ebee7e2a..5188c77f 100644 --- a/doc/tutorial/doc/html/index.html +++ b/doc/tutorial/doc/html/index.html @@ -31,7 +31,7 @@
Copyright © 2002-2005 Joel de Guzman, David Abrahams
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt ) @@ -94,7 +94,7 @@ (IDL).
@@ -145,7 +145,7 @@
Last revised: May 17, 2007 at 14:24:30 GMT |
+Last revised: May 18, 2007 at 15:46:01 GMT |
@@ -82,7 +82,7 @@ exe embedded_program # name of the executable <find-library>$(PYTHON_EMBEDDED_LIBRARY) ;
@@ -137,7 +137,7 @@ exe embedded_program # name of the executable automate the process.
@@ -188,7 +188,7 @@ exe embedded_program # name of the executable a phrase that is well-known in programming circles.
@@ -215,15 +215,12 @@ exe embedded_program # name of the executable int five_squared = extract<int>(result);
- If an exception occurs in the execution of some Python code, the PyRun_String
- function returns a null pointer. Constructing a handle
- out of this null pointer throws error_already_set,
- so basically, the Python exception is automatically translated into a C++
- exception when using handle:
+ If an exception occurs in the evaluation of the python expression, error_already_set
+ is thrown:
try @@ -232,7 +229,7 @@ exe embedded_program # name of the executable // execution will never get here: int five_divided_by_zero = extract<int>(result); } -catch(error_already_set) +catch(error_already_set const &) { // handle the exception in some way } @@ -248,7 +245,7 @@ exe embedded_program # name of the executable exceptions:-catch(error_already_set) +catch(error_already_set const &) { if (PyErr_ExceptionMatches(PyExc_ZeroDivisionError)) { @@ -265,23 +262,6 @@ exe embedded_program # name of the executable (To retrieve even more information from the exception you can use some of the other exception handling functions listed here.) -- If you'd rather not have
-handlethrow a C++ exception - when it is constructed, you can use the allow_null - function in the same way you'd use borrowed: --handle<> result((allow_null(PyRun_String( - "5/0" - , Py_eval_input - , main_namespace.ptr() - , main_namespace.ptr())))); - -if (!result) - // Python exception occurred -else - // everything went okay, it's safe to use the result -