* python/py-frame.c (frapy_block): Fix error message text.
[deliverable/binutils-gdb.git] / gdb / python / py-frame.c
index 2615ddf75fb14a8b7fe599b59f53ca14f9e6ff64..bff3ea42c69d55e169be751dc7e97f10d9bc00be 100644 (file)
@@ -260,7 +260,7 @@ frapy_block (PyObject *self, PyObject *args)
   if (block == NULL || fn_block == NULL || BLOCK_FUNCTION (fn_block) == NULL)
     {
       PyErr_SetString (PyExc_RuntimeError,
-                      _("Cannot locate object file for block."));
+                      _("Cannot locate block for frame."));
       return NULL;
     }
 
@@ -333,8 +333,12 @@ frame_info_to_frame_object (struct frame_info *frame)
        }
       frame_obj->gdbarch = get_frame_arch (frame);
     }
-  GDB_PY_HANDLE_EXCEPTION (except);
-
+  if (except.reason < 0)
+    {
+      Py_DECREF (frame_obj);
+      gdbpy_convert_exception (except);
+      return NULL;
+    }
   return (PyObject *) frame_obj;
 }
 
@@ -477,7 +481,8 @@ frapy_read_var (PyObject *self, PyObject *args)
       if (except.reason < 0)
        {
          do_cleanups (cleanup);
-         GDB_PY_HANDLE_EXCEPTION (except);
+         gdbpy_convert_exception (except);
+         return NULL;
        }
 
       if (!var)
This page took 0.025826 seconds and 4 git commands to generate.