|
Re: embedding: getting exception information?: msg#00342python.c++
Here's what I did: std::string PythonInterpreterImpl::pythonError() const { PyObject* errType(NULL); PyObject* errValue(NULL); PyObject* errTraceback(NULL); PyErr_Fetch(&errType, &errValue, &errTraceback); if (NULL == errValue) { return "Unknown Python Error"; } handle<> errHandle(errValue); str errObj(errHandle); char *errMsg = extract< char* >(errObj); return errMsg; } Achim Domma (ProCoders) wrote: Hi, -- Gavin Doughtie DreamWorks SKG (818) 695-3821 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: embedding: getting exception information?: 00342, David Abrahams |
|---|---|
| Next by Date: | Re: Re: accessing the python type system: 00342, Stefan Seefeld |
| Previous by Thread: | Re: embedding: getting exception information?i: 00342, David Abrahams |
| Next by Thread: | [newbie] Failing to test boost.python under cygwin: 00342, Gilles Orazi |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |