10 PyErr_Fetch(&exc,&val,&trace);
11 PyErr_NormalizeException(&exc,&val,&trace);
12 handle<> hExc(allow_null(exc));
13 handle<> hVal(allow_null(val));
14 handle<> hTrace(allow_null(trace));
17 object oTrace(hTrace);
18 handle<> hStringTr(PyObject_Str(oTrace.ptr()));
19 object stringTr(hStringTr);
26 handle<> hStringVal(PyObject_Str(oVal.ptr()));
27 object stringVal( hStringVal );
29 handle<> hStringExc(PyObject_Str(oExc.ptr()));
30 object stringExc( hStringExc);
34 <<
"python encountered the error: " 36 << PyString_AsString(stringExc.ptr()) <<
"\n" 38 << PyString_AsString(stringVal.ptr()) <<
"\n";
40 throw cms::Exception(iType)<<
" unknown python problem occurred.\n";
void pythonToCppException(const std::string &iType)