Bonjour,
J'ai la méthode suivante pour récupérer la derniere excepetion coté python

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
bool pyEval::PyErrorRetreive(string &a_type, string &a_value, string &a_traceback)
{
	

	PyObject *type = NULL, *value = NULL, *traceback = NULL, *pyString = NULL;
	//chercher le type, la valeur et pile d'appelle de l'exception
	PyErr_Fetch(&type, &value, &traceback);
	PyErr_Clear();
	if (type != NULL && (pyString=PyObject_Str(type))!=NULL && (PyString_Check(pyString)))
		a_type= PyString_AsString(pyString);
	else
		a_type= "<unknown exception type> ";
	Py_XDECREF(pyString);
	pyString=NULL;

	//convertir la valeur en chaine
	if (value != NULL && (pyString=PyObject_Str(value))!=NULL && (PyString_Check(pyString))) {
		a_value= PyString_AsString(pyString);
	} else
		a_value= "<unknown exception date> ";
	Py_XDECREF(pyString);
	pyString=NULL;

	//Je ne sais pas, pour le moment, comment convertir la pile d'appel en chaine
	if (traceback != NULL && PyTraceBack_Check(traceback)) {
		a_traceback="";//????
	}
	else
		a_traceback="";//????

	//libere les 3 objets python
	Py_XDECREF(type);
	Py_XDECREF(value);
	Py_XDECREF(traceback);
	return true;
}

Mon problème est dans la partie en rouge !
Je ne sais pas, pour le moment, comment convertir la pile d'appel en chaine