Hopefully I am doin' it right. invalid_argument seems like the correct
analogue to ValueError.
GMail shouldn't mangle this, but it wouldn't be the first time.
~ C.
--- Compiler/ExprNodes.py.back 2010-09-02 23:57:02.000000000 -0700
+++ Compiler/ExprNodes.py 2010-09-02 23:46:30.000000000 -0700
@@ -7028,6 +7028,9 @@
; // let the latest Python exn pass through and ignore the current one
else
throw;
+ } catch (const std::invalid_argument& exn) {
+ // Catch invalid_argument explicitly and raise a ValueError
+ PyErr_SetString(PyExc_ValueError, exn.what());
} catch (const std::out_of_range& exn) {
// catch out_of_range explicitly so the proper Python exn may be raised
PyErr_SetString(PyExc_IndexError, exn.what());
--
When the facts change, I change my mind. What do you do, sir? ~ Keynes
Corbin Simpson
<[email protected]>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev