Commits

Anthony Tuininga committed 2cf52b3

Normalize the exception prior to working with it in order to avoid traceback
errors on Python 3.

Comments (0)

Files changed (1)

source/bases/Win32GUI.c

 
     // create caption and message objects
     PyErr_Fetch(&type, &value, &traceback);
+    PyErr_NormalizeException(&type, &value, &traceback);
     contextMessageObj = cxString_FromAscii(contextMessage);
     if (!contextMessageObj)
         return FatalError("Cannot create context message string object.");
     int exitCode = 0;
 
     PyErr_Fetch(&type, &value, &traceback);
+    PyErr_NormalizeException(&type, &value, &traceback);
     caption = PyObject_GetAttrString(value, "caption");
     if (!caption || !cxString_Check(caption)) {
         PyErr_Clear();
 
     // get the exception details
     PyErr_Fetch(&type, &value, &traceback);
+    PyErr_NormalizeException(&type, &value, &traceback);
     argsTuple = PyTuple_New(3);
     if (!argsTuple)
         return FatalPythonErrorNoTraceback(value, "Cannot create args tuple.");
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.