Ctypes catching exception
<p>I'm playing a little bit with ctypes and C/C++ DLLs
I have a quite simple "math" dll</p>

<pre><code>double Divide(double a, double b)
{
    if (b == 0)
    {
       throw new invalid_argument("b cannot be zero!");
    }

    return a / b;
}
</code></pre>

<p>It works so far
the only problem, i get a WindowsError Exception in Python and I cannot retrieve the text 
<em>b cannot be zero</em>
Is there some special exception type I must throw? Or must the Python code be altered?
python code:</p>

<pre><code>from ctypes import *

mathdll=cdll.MathFuncsDll
divide = mathdll.Divide
divide.restype = c_double
divide.argtypes = [c_double, c_double]

try:
    print divide (10,0)
except WindowsError:
    print "lalal"
except:
    print "dada"
</code></pre>
