PyRun_String does not appear to handle EInvalidOp exceptions

H

Heather Korns

Here's a snippet of code that demonstrates my problem:

result = PyRun_String ("import math", Py_file_input, pdict,pdict);
result = PyRun_String ("math.sqrt(-1)", Py_file_input, pdict,pdict);
result = PyRun_String ("math.pow(2,1024)", Py_file_input,
pdict,pdict);


Other types of exceptions seem to be handled properly by PyRun_String;
however, EInvalidOp or EOverflow exceptions do not seem to be handled.
My application is unable to recover gracefully after this exception
occurs.

Has anyone else run into this problem?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,241
Messages
2,571,219
Members
47,850
Latest member
StewartTha

Latest Threads

Top