(EMBEDDING) Can't get python error message

A

anonymisiert85

I run this string to produce a error "x+1"

PyRun_SimpleStringFlags() return -1, so that i know this is a script
with error inside...

but now - how can i get error message?

i tested some py-functions - but this functions do not work... i
called this functions direct after PyRun_SimpleStringFlags

PyErr_Occurred() return always 0
PyErr_Fetch() with 3 pointers... all values are always Null
PyErr_Print() do nothing

strange...

but after my programm end... here comes a error message (from StdErr i
think)

Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'x' is not defined
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top