Boost logo

Boost-Commit :

From: rwgk_at_[hidden]
Date: 2008-03-08 23:30:14


Author: rwgk
Date: 2008-03-08 23:30:13 EST (Sat, 08 Mar 2008)
New Revision: 43546
URL: http://svn.boost.org/trac/boost/changeset/43546

Log:
map std::invalid_argument -> Python ValueError
Text files modified:
   trunk/libs/python/src/errors.cpp | 4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)

Modified: trunk/libs/python/src/errors.cpp
==============================================================================
--- trunk/libs/python/src/errors.cpp (original)
+++ trunk/libs/python/src/errors.cpp 2008-03-08 23:30:13 EST (Sat, 08 Mar 2008)
@@ -41,6 +41,10 @@
     {
         PyErr_SetString(PyExc_IndexError, x.what());
     }
+ catch(const std::invalid_argument& x)
+ {
+ PyErr_SetString(PyExc_ValueError, x.what());
+ }
     catch(const std::exception& x)
     {
         PyErr_SetString(PyExc_RuntimeError, x.what());


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk