Use gdbpy_convert_exception in a few more spots
[binutils-gdb.git] / gdb / python / py-value.c
index d21c2faf64a21e26aa72764460cc0c1ec390b00e..430415b2f9b764e65b280f9cb30f3860b9abd6bd 100644 (file)
@@ -1732,9 +1732,7 @@ convert_value_from_python (PyObject *obj)
     }
   CATCH (except, RETURN_MASK_ALL)
     {
-      PyErr_Format (except.reason == RETURN_QUIT
-                   ? PyExc_KeyboardInterrupt : PyExc_RuntimeError,
-                   "%s", except.message);
+      gdbpy_convert_exception (except);
       return NULL;
     }
   END_CATCH