Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch][doc] Fix PR python/15613 (make gdb.GdbError formatting consistent with other exceptions
@ 2013-09-18 20:02 Phil Muldoon
  2013-09-18 20:37 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Muldoon @ 2013-09-18 20:02 UTC (permalink / raw)
  To: gdb-patches

This patch addresses PR 15613.  This makes the formatting of
gdb.GdbError more consistent with other exception types documented.

OK?

Cheers,

Phil


2013-09-18  Phil Muldoon  <pmuldoon@redhat.com>

	PR python/15613

	* gdb.texinfo (Exception Handling): Reorganize gdb.Error to be an
	item in a table instead of an findex.

--

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 60d2877..0796e45 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -23631,6 +23631,11 @@ NameError: name 'foo' is not defined
 Python code are converted to Python exceptions.  The type of the
 Python exception depends on the error.
 
+For the exceptions detailed below, your exception handler will see the
+@value{GDBN} error message as its value and the Python call stack
+backtrace at the Python statement closest to where the @value{GDBN}
+error occurred as the traceback.
+
 @ftable @code
 @item gdb.error
 This is the base class for most exceptions generated by @value{GDBN}.
@@ -23649,12 +23654,11 @@ User interrupt (via @kbd{C-c} or by typing @kbd{q} at a pagination
 prompt) is translated to a Python @code{KeyboardInterrupt} exception.
 @end ftable
 
-In all cases, your exception handler will see the @value{GDBN} error
-message as its value and the Python call stack backtrace at the Python
-statement closest to where the @value{GDBN} error occured as the
-traceback.
+Some exceptions types will not trigger a traceback to be printed in
+@value{GDBN}.  The table below details these types of exception.
 
-@findex gdb.GdbError
+@ftable @code
+@item gdb.GdbError
 When implementing @value{GDBN} commands in Python via @code{gdb.Command},
 it is useful to be able to throw an exception that doesn't cause a
 traceback to be printed.  For example, the user may have invoked the
@@ -23677,6 +23681,7 @@ to handle this case.  Example:
 (gdb) hello-world 42
 hello-world takes no arguments
 @end smallexample
+@end ftable
 
 @node Values From Inferior
 @subsubsection Values From Inferior

	


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-18 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-18 20:02 [patch][doc] Fix PR python/15613 (make gdb.GdbError formatting consistent with other exceptions Phil Muldoon
2013-09-18 20:37 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox