2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 06:02:14 +00:00

Added std::wstring conversion support

Added std::out_of_range => Python IndexError exception conversion,
thanks to Raoul Gough


[SVN r20027]
This commit is contained in:
Dave Abrahams
2003-09-11 19:19:55 +00:00
parent 8b97caae46
commit f920dc87d0
6 changed files with 93 additions and 26 deletions

View File

@@ -38,6 +38,10 @@ BOOST_PYTHON_DECL bool handle_exception_impl(function0<void> f)
{
PyErr_SetString(PyExc_OverflowError, x.what());
}
catch(const std::out_of_range& x)
{
PyErr_SetString(PyExc_IndexError, x.what());
}
catch(const std::exception& x)
{
PyErr_SetString(PyExc_RuntimeError, x.what());